Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,15 +137,13 @@ def notifyServer(self, job):
if job.notifyURL:
outputFileName = job.outputFile.split(
"/")[-1] # get filename from path
fh = open(job.outputFile, 'rb')
files = {'file': unicode(fh.read(), errors='ignore')}
files = {'file': open(job.outputFile, 'rb')}
hdrs = {'Filename': outputFileName}
self.log.debug("Sending request to %s" % job.notifyURL)
response = requests.post(
job.notifyURL, files=files, headers=hdrs, verify=False)
self.log.info("Response from callback to %s:%s" %
(job.notifyURL, response.content))
fh.close()
except Exception as e:
self.log.debug("Error in notifyServer: %s" % str(e))

Expand Down