Skip to content

Commit

Permalink
Fix for zeromq_pub module: change from dict comprehesion to generator…
Browse files Browse the repository at this point in the history
… expression with dict constructor, otherwise not supported in Python 2.6

SyntaxError: ('invalid syntax', ('./zeromq_pub/python_modules/zpubmon.py', 81, 26, '    counter = {name: 0 for name in params}\n'))
  • Loading branch information
jj-wolf committed Feb 13, 2015
1 parent 6eb6ced commit 3d53974
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion zeromq_pub/python_modules/zpubmon.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def metric_init(params):
"""
groups = params.pop('groups', 'ZeroMQ')
counter = {name: 0 for name in params}
counter = dict((name, 0) for name in params)

thread = threading.Thread(target=zmq_pub_mon, args=(params, counter))
thread.daemon = True
Expand Down

0 comments on commit 3d53974

Please sign in to comment.