aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortpavelchak2019-10-18 16:21:47 +0300
committerjason2019-10-25 10:35:58 -0600
commit3a536e184309f04a4ffe9dff446207e7267f2f99 (patch)
treea186e5dc5827358afbf0d93d49075ceef9da1f46
parent9cb7b0e7d44b8dfe5eaf2d7df133a67e072e9481 (diff)
downloadeventmq-3a536e184309f04a4ffe9dff446207e7267f2f99.tar.gz
eventmq-3a536e184309f04a4ffe9dff446207e7267f2f99.zip
Update print, xrange and unicode functions for python 2/3 compatibility
-rw-r--r--bin/logwatcher.py2
-rw-r--r--eventmq/subscriber.py3
2 files changed, 3 insertions, 2 deletions
diff --git a/bin/logwatcher.py b/bin/logwatcher.py
index dd2860f..1abeb4a 100644
--- a/bin/logwatcher.py
+++ b/bin/logwatcher.py
@@ -13,4 +13,4 @@ while True:
13 13
14 if events.get(s) == zmq.POLLIN: 14 if events.get(s) == zmq.POLLIN:
15 msg = s.recv_multipart() 15 msg = s.recv_multipart()
16 print msg # noqa 16 print(msg) # noqa
diff --git a/eventmq/subscriber.py b/eventmq/subscriber.py
index f585572..ef1aa0b 100644
--- a/eventmq/subscriber.py
+++ b/eventmq/subscriber.py
@@ -1,6 +1,7 @@
1""" 1"""
2derp subscriber 2derp subscriber
3""" 3"""
4from past.builtins import xrange
4import zmq 5import zmq
5 6
6 7
@@ -18,4 +19,4 @@ if __name__ == "__main__":
18 # block until something comes in. normally you'd do something with 19 # block until something comes in. normally you'd do something with
19 # this in another thread or something 20 # this in another thread or something
20 for s in sockets: 21 for s in sockets:
21 print s.recv_multipart() # noqa 22 print(s.recv_multipart()) # noqa