@@ -73,9 +73,9 @@ def upgrade_and_run(
7373 module_name = package_name .replace ("-" , "_" )
7474 try_running_module (
7575 module_name ,
76+ * args ,
7677 cloudsmith_url = cloudsmith_url ,
7778 slack_webhook_url = slack_webhook_url ,
78- * args ,
7979 )
8080 return was_updated , response_err
8181
@@ -458,7 +458,7 @@ def split_package_name_and_extra(package_install_cmd):
458458 return package_name , extra
459459
460460
461- def try_running_module (wheel , cloudsmith_url = None , slack_webhook_url = None , * args ):
461+ def try_running_module (wheel , * args , ** kwargs ):
462462 file_name = os .path .basename (wheel )
463463 module_name = file_name .split ("-" , 1 )[0 ]
464464 # don't try running the module if it does not exists
@@ -468,7 +468,9 @@ def try_running_module(wheel, cloudsmith_url=None, slack_webhook_url=None, *args
468468 try :
469469 run_module_and_reload_uwsgi_app (module_name , * args )
470470 except Exception :
471+ slack_webhook_url = kwargs .get ("slack_webhook_url" )
471472 if slack_webhook_url is not None :
473+ cloudsmith_url = kwargs .get ("cloudsmith_url" )
472474 send_upgrade_notification (
473475 f"Failed to run module { module_name } " ,
474476 cloudsmith_url ,
0 commit comments