Skip to content

Commit

Permalink
Moving config files check further down
Browse files Browse the repository at this point in the history
  • Loading branch information
kjvbrt committed Aug 14, 2023
1 parent 8cfced9 commit 0164ec1
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions k4FWCore/scripts/k4run
Original file line number Diff line number Diff line change
Expand Up @@ -122,12 +122,6 @@ if __name__ == "__main__":
print(" %s (from %s)" % (item, cfgDb[item]["lib"]))
sys.exit()

if len(opts[0].config_files) == 0 \
and ('-h' not in opts[1] and '--help' not in opts[1]):
print('Error: missing gaudi options file.\n'
'Usage: k4run <options_file.py>, use --help to get a complete list of arguments')
sys.exit(1)

for file in opts[0].config_files:
load_file(file)

Expand All @@ -140,6 +134,11 @@ if __name__ == "__main__":

opts = parser.parse_args()

if len(opts.config_files) == 0:
print('Error: missing gaudi options file.\n'
'Usage: k4run <options_file.py>, use --help to get a complete list of arguments')
sys.exit(1)

# print a doc line showing the configured algorithms
logger.info(' '.join(f'--> {alg.name()}' for alg in ApplicationMgr().TopAlg))

Expand Down

0 comments on commit 0164ec1

Please sign in to comment.