Skip to content

Commit

Permalink
k4run: add help manually
Browse files Browse the repository at this point in the history
  • Loading branch information
Zehvogel committed Aug 2, 2023
1 parent 02059d0 commit b781996
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion k4FWCore/scripts/k4run
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ if __name__ == "__main__":
logger.addHandler(handler)

global parser
parser = argparse.ArgumentParser(description="Run job in the Key4HEP framework")
parser = argparse.ArgumentParser(description="Run job in the Key4HEP framework", add_help=False)
parser.add_argument("config_files", type=open, action=LoadFromFile, nargs="*",
help="Gaudi config (python) files describing the job")
parser.add_argument("--dry-run", action="store_true",
Expand Down Expand Up @@ -140,6 +140,9 @@ if __name__ == "__main__":
print(" %s (from %s)" % (item, cfgDb[item]["lib"]))
sys.exit()

# add help manually here, if it is added earlier the parser exits after the first parse_arguments call
parser.add_argument("-h", "--help", action="help", default=argparse.SUPPRESS, help="show this help message and exit")

opts = parser.parse_args()

# print a doc line showing the configured algorithms
Expand Down

0 comments on commit b781996

Please sign in to comment.