Skip to content

Commit 7aa07b6

Browse files
committed
fix sysarg readout
1 parent ffd849c commit 7aa07b6

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

Images/test_plugin.sh

100644100755
File mode changed.

Images/trigger.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -87,17 +87,15 @@ def make_app():
8787
])
8888

8989
if __name__ == "__main__":
90-
if len(sys.argv) == 1:
91-
plugin_start_script = sys.argv[1]
92-
elif len(sys.argv) == 3:
93-
conda_env_name = sys.argv[1]
94-
plugin_start_script = sys.argv[2]
95-
plugin_src_dir = sys.argv[3]
90+
if len(sys.argv) == 1+1:
91+
_, plugin_start_script = sys.argv
92+
elif len(sys.argv) == 3+1:
93+
_, conda_env_name, plugin_start_script, plugin_src_dir = sys.argv
9694
else:
9795
print("Incorrect number of arguments provided\nUsage: trigger.py <conda_env_name> <plugin_start_script> <plugin_src_dir> <-- for use with conda\n or trigger.py <plugin_start_script> <-- for use without conda\n", file=sys.stderr)
9896
exit(1)
9997

10098
app = make_app()
10199
app.listen(5000) # Server auf Port 5000 starten
102-
print("Server laeuft auf http://localhost:5000", file=sys.stderr)
100+
print("Server listening on http://localhost:5000", file=sys.stderr)
103101
tornado.ioloop.IOLoop.current().start()

0 commit comments

Comments
 (0)