Skip to content

Commit

Permalink
Fix another occurence of unicode incompatible with some pycurl versio…
Browse files Browse the repository at this point in the history
…ns (#4652)
  • Loading branch information
emaszs authored Nov 7, 2016
1 parent 230385d commit 4888e5b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/python/CRABClient/JobType/Analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ def run(self, filecacheurl = None):
tb.addFiles(userFiles=inputFiles, cfgOutputName=cfgOutputName)
configArguments['adduserfiles'] = [os.path.basename(f) for f in inputFiles]
try:
# convert from unicode to ascii to make it work with CMSSW_5_3_22
# convert from unicode to ascii to make it work with older pycurl versions
uploadResult = tb.upload(filecacheurl = filecacheurl.encode('ascii', 'ignore'))
except HTTPException as hte:
if 'X-Error-Info' in hte.headers:
Expand Down Expand Up @@ -179,7 +179,8 @@ def run(self, filecacheurl = None):
with UserTarball(name=debugTarFilename, logger=self.logger, config=self.config) as dtb:
dtb.addMonFiles()
try:
debugFilesUploadResult = dtb.upload(filecacheurl = filecacheurl)
# convert from unicode to ascii to make it work with older pycurl versions
debugFilesUploadResult = dtb.upload(filecacheurl = filecacheurl.encode('ascii', 'ignore'))
except Exception as e:
msg = ("Problem uploading debug_files.tar.gz.\nError message: %s.\n"
"More details can be found in %s" % (e, self.logger.logfile))
Expand Down

0 comments on commit 4888e5b

Please sign in to comment.