Skip to content

Commit

Permalink
autopep8 action fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mesmith75 authored Feb 12, 2024
1 parent dc3f70c commit b7cb45b
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions ganga/GangaDirac/Lib/Server/DiracCommands.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def ping(system, service):
def removeFile(lfn):
''' Remove a given LFN from the DFC'''
ret = {}
if type(lfn) is list:
if isinstance(lfn, list):
for l in lfn:

Check failure on line 56 in ganga/GangaDirac/Lib/Server/DiracCommands.py

View workflow job for this annotation

GitHub Actions / Linting

E741 ambiguous variable name 'l'
ret.update(dirac.removeFile(l))
else:
Expand Down Expand Up @@ -165,7 +165,8 @@ def getOutputSandbox(id, outputDir=os.getcwd(), unpack=True, oversized=True, noJ

os.system(
'for file in $(ls %s/*Ganga_*.log); do ln -s ${file} %s/stdout; break; done' % (outputDir, outputDir))
# So the download failed. Maybe the sandbox was oversized and stored on the grid. Check in the job parameters and download it
# So the download failed. Maybe the sandbox was oversized and stored on
# the grid. Check in the job parameters and download it
else:
parameters = dirac.getJobParameters(id)
if parameters is not None and parameters.get('OK', False):
Expand Down Expand Up @@ -222,7 +223,7 @@ def getOutputDataLFNs(id, pipe_out=True):
if 'UploadedOutputData' in parameters:
lfn_list = parameters['UploadedOutputData']
import re
lfns = re.split(',\s*', lfn_list)
lfns = re.split(',\\s*', lfn_list)
if sandbox is not None and sandbox in lfns:
lfns.remove(sandbox)
ok = True
Expand Down Expand Up @@ -312,7 +313,7 @@ def status(job_ids, statusmapping, pipe_out=True):
from DIRAC.Core.DISET.RPCClient import RPCClient
monitoring = RPCClient('WorkloadManagement/JobMonitoring')
app_status = monitoring.getJobAttributes(_id)['Value']['ApplicationStatus']
except:
except BaseException:
app_status = "unknown ApplicationStatus"

status_list.append([minor_status, dirac_status, dirac_site, ganga_status, app_status])
Expand Down Expand Up @@ -475,7 +476,7 @@ def listFiles(baseDir, minAge=None):
withMetaData = False
cutoffTime = datetime.utcnow()
import re
r = re.compile('\d:\d:\d')
r = re.compile('\\d:\\d:\\d')
if r.match(minAge):
withMetaData = True
timeList = minAge.split(':')
Expand Down

0 comments on commit b7cb45b

Please sign in to comment.