Skip to content
Snippets Groups Projects
Commit 6dba041d authored by Frank Winklmeier's avatar Frank Winklmeier
Browse files

FileStager: enable flake8 and fix code

parent f7215674
No related branches found
No related tags found
No related merge requests found
# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
from AthenaCommon.Configurable import ConfigurableAlgorithm
from AthenaCommon.Constants import * # for "INFO"
from AthenaCommon.Constants import WARNING
class FileStagerAlg( ConfigurableAlgorithm ):
# slots is a sequence of properties that the use is allowed to set
......
......@@ -3,8 +3,7 @@
from __future__ import print_function
import os
import sys, string
from datetime import datetime
import sys
from future import standard_library
standard_library.install_aliases()
......@@ -12,7 +11,7 @@ import subprocess
## Needed to correct ROOT behavior; see below
CWD = os.getcwd()
import ROOT
import ROOT # noqa: F401
## Importing gSystem may change the current directory to one of the
## command-line arguments; chdir to original directory to have
## predictable behavior
......@@ -125,22 +124,22 @@ class FileStagerTool:
# last fallback
try:
defaultTmpdir = os.environ['TMPDIR']
except Exception as inst:
except Exception:
pass
# cern lxbatch
try:
defaultTmpdir = os.environ['WORKDIR']
except Exception as inst:
except Exception:
pass
# osg
try:
defaultTmpdir = os.environ['OSG_WN_TMP']
except Exception as inst:
except Exception:
pass
# lcg
try:
defaultTmpdir = os.environ['EDG_WL_SCRATCH']
except Exception as inst:
except Exception:
pass
# use given tmpdir
......@@ -176,7 +175,7 @@ class FileStagerTool:
rfioPiece = self.sampleList[0].split(self.InfilePrefix)
nPieces = len(rfioPiece)
inFile = rfioPiece[nPieces-1]
inFile = rfioPiece[nPieces-1] # noqa: F841
outFile = self.tmpSampleList[0]
stderr = outFile+"_stage.err"
stdout = outFile+"_stage.out"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment