From 4888e5bab8ab1b657f1c94fc5cfbf8105d6f484d Mon Sep 17 00:00:00 2001 From: Emilis Rupeika Date: Mon, 7 Nov 2016 17:39:53 +0100 Subject: [PATCH] Fix another occurence of unicode incompatible with some pycurl versions (#4652) --- src/python/CRABClient/JobType/Analysis.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/python/CRABClient/JobType/Analysis.py b/src/python/CRABClient/JobType/Analysis.py index 9082eb63a..c1c38ee40 100644 --- a/src/python/CRABClient/JobType/Analysis.py +++ b/src/python/CRABClient/JobType/Analysis.py @@ -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: @@ -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))