Skip to content

Commit ce8065b

Browse files
authored
Merge pull request #187 from Coulicoula/fix_bug
Fixing a UnicodeEncodeError
2 parents a558e15 + acfdb78 commit ce8065b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

blackduck/Scans.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ def upload_scan(self, filename):
1111
headers = self.get_headers()
1212
if filename.endswith('.json') or filename.endswith('.jsonld'):
1313
headers['Content-Type'] = 'application/ld+json'
14-
with open(filename,"r") as f:
14+
with open(filename,"rb") as f:
1515
response = requests.post(url, headers=headers, data=f, verify=not self.config['insecure'])
1616
elif filename.endswith('.bdio'):
1717
headers['Content-Type'] = 'application/vnd.blackducksoftware.bdio+zip'

0 commit comments

Comments
 (0)