nagios/fedmsg: make changes yesterday remain py2 backwards compatible
Signed-off-by: Rick Elrod <relrod@redhat.com>
This commit is contained in:
parent
e1335cf937
commit
4e71722d8a
7 changed files with 28 additions and 7 deletions
|
@ -25,7 +25,10 @@ try:
|
|||
ctx = zmq.Context()
|
||||
s = ctx.socket(zmq.SUB)
|
||||
s.connect(connect_to)
|
||||
s.setsockopt_string(zmq.SUBSCRIBE, '')
|
||||
try:
|
||||
s.setsockopt(zmq.SUBSCRIBE, '')
|
||||
except TypeError:
|
||||
s.setsockopt_string(zmq.SUBSCRIBE, '')
|
||||
|
||||
poller = zmq.Poller()
|
||||
poller.register(s, zmq.POLLIN)
|
||||
|
|
|
@ -25,7 +25,10 @@ try:
|
|||
ctx = zmq.Context()
|
||||
s = ctx.socket(zmq.SUB)
|
||||
s.connect(connect_to)
|
||||
s.setsockopt_string(zmq.SUBSCRIBE, '')
|
||||
try:
|
||||
s.setsockopt(zmq.SUBSCRIBE, '')
|
||||
except TypeError:
|
||||
s.setsockopt_string(zmq.SUBSCRIBE, '')
|
||||
poller = zmq.Poller()
|
||||
poller.register(s, zmq.POLLIN)
|
||||
|
||||
|
|
|
@ -27,7 +27,10 @@ try:
|
|||
ctx = zmq.Context()
|
||||
s = ctx.socket(zmq.SUB)
|
||||
s.connect(connect_to)
|
||||
s.setsockopt_string(zmq.SUBSCRIBE, '')
|
||||
try:
|
||||
s.setsockopt(zmq.SUBSCRIBE, '')
|
||||
except TypeError:
|
||||
s.setsockopt_string(zmq.SUBSCRIBE, '')
|
||||
|
||||
poller = zmq.Poller()
|
||||
poller.register(s, zmq.POLLIN)
|
||||
|
|
|
@ -27,7 +27,10 @@ try:
|
|||
ctx = zmq.Context()
|
||||
s = ctx.socket(zmq.SUB)
|
||||
s.connect(connect_to)
|
||||
s.setsockopt_string(zmq.SUBSCRIBE, '')
|
||||
try:
|
||||
s.setsockopt(zmq.SUBSCRIBE, '')
|
||||
except TypeError:
|
||||
s.setsockopt_string(zmq.SUBSCRIBE, '')
|
||||
poller = zmq.Poller()
|
||||
poller.register(s, zmq.POLLIN)
|
||||
|
||||
|
|
|
@ -21,7 +21,10 @@ try:
|
|||
ctx = zmq.Context()
|
||||
s = ctx.socket(zmq.SUB)
|
||||
s.connect(connect_to)
|
||||
s.setsockopt_string(zmq.SUBSCRIBE, '')
|
||||
try:
|
||||
s.setsockopt(zmq.SUBSCRIBE, '')
|
||||
except TypeError:
|
||||
s.setsockopt_string(zmq.SUBSCRIBE, '')
|
||||
|
||||
poller = zmq.Poller()
|
||||
poller.register(s, zmq.POLLIN)
|
||||
|
|
|
@ -21,7 +21,10 @@ try:
|
|||
ctx = zmq.Context()
|
||||
s = ctx.socket(zmq.SUB)
|
||||
s.connect(connect_to)
|
||||
s.setsockopt_string(zmq.SUBSCRIBE, '')
|
||||
try:
|
||||
s.setsockopt(zmq.SUBSCRIBE, '')
|
||||
except TypeError:
|
||||
s.setsockopt_string(zmq.SUBSCRIBE, '')
|
||||
poller = zmq.Poller()
|
||||
poller.register(s, zmq.POLLIN)
|
||||
|
||||
|
|
|
@ -23,7 +23,10 @@ try:
|
|||
ctx = zmq.Context()
|
||||
s = ctx.socket(zmq.SUB)
|
||||
s.connect(connect_to)
|
||||
s.setsockopt_string(zmq.SUBSCRIBE, '')
|
||||
try:
|
||||
s.setsockopt(zmq.SUBSCRIBE, '')
|
||||
except TypeError:
|
||||
s.setsockopt_string(zmq.SUBSCRIBE, '')
|
||||
poller = zmq.Poller()
|
||||
poller.register(s, zmq.POLLIN)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue