diff --git a/k4FWCore/scripts/k4run b/k4FWCore/scripts/k4run index 38ce40f5..92802c74 100755 --- a/k4FWCore/scripts/k4run +++ b/k4FWCore/scripts/k4run @@ -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 , use --help to get a complete list of arguments') - sys.exit(1) - for file in opts[0].config_files: load_file(file) @@ -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 , 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))