Skip to content

Commit b88afe7

Browse files
committed
main(): Fix using wrong commandline argument for role
1 parent fe748e1 commit b88afe7

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

msgflo/msgflo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ def run(participant, broker=None, done_cb=None):
314314
def main(Participant, role=None):
315315
if not role:
316316
try:
317-
role = sys.argv[0]
317+
role = sys.argv[1]
318318
except IndexError, e:
319319
role = participant.definition.component.tolower()
320320

spec/participant.coffee

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@ chai = require 'chai' unless chai
44
heterogenous = require '../node_modules/msgflo/spec/heterogenous.coffee'
55

66
python = process.env.PYTHON or 'python'
7+
repeatPy = path.join __dirname, '..', 'examples', 'repeat.py'
78
participants =
8-
'PythonRepeat': [python, path.join __dirname, '..', 'examples', 'repeat.py']
9+
'PythonRepeat': [python, repeatPy, 'repeater']
910

1011
# Note: most require running an external broker service
1112
transports =

0 commit comments

Comments
 (0)