Skip to content

Commit

Permalink
user-agent: Append program name, if not "cwltool"
Browse files Browse the repository at this point in the history
Should work for calrissian, reana-cwl-runner, and arvados-cwl-runner, but not
toil-cwl-runner which doesn't call the cwltool.main.main() function.

Probably works for streamflow, but I haven't tested that.
  • Loading branch information
mr-c committed Feb 28, 2024
1 parent d73d555 commit 7bbace0
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion cwltool/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -988,8 +988,13 @@ def main(
workflowobj = None
prov_log_handler: Optional[logging.StreamHandler[ProvOut]] = None
global docker_exe

user_agent = "cwltool"
if user_agent not in (progname := os.path.basename(sys.argv[0])):
user_agent += f" {progname}" # append the real program name as well
append_word_to_default_user_agent(user_agent)

try:
append_word_to_default_user_agent("cwltool")
if args is None:
if argsl is None:
argsl = sys.argv[1:]
Expand Down

0 comments on commit 7bbace0

Please sign in to comment.