Skip to content
Snippets Groups Projects
Commit 664bc592 authored by Piotr Maślanka's avatar Piotr Maślanka
Browse files

fixed #19

parent 63185483
No related branches found
No related tags found
No related merge requests found
...@@ -122,15 +122,12 @@ class Cluster(object): ...@@ -122,15 +122,12 @@ class Cluster(object):
if tx is not None: # confirm is a drop-in replacement. tx is unfortunately named if tx is not None: # confirm is a drop-in replacement. tx is unfortunately named
warnings.warn(u'Use confirm kwarg instead', DeprecationWarning) warnings.warn(u'Use confirm kwarg instead', DeprecationWarning)
if confirm is None: if confirm is not None:
tx = False
else:
raise RuntimeError(u'Using both tx= and confirm= at once does not make sense') raise RuntimeError(u'Using both tx= and confirm= at once does not make sense')
elif confirm is None: elif confirm is not None:
tx = False
else:
tx = confirm tx = confirm
else:
tx = False
try: try:
return (self.pub_tr if tx else self.pub_na).publish(message, exchange, routing_key.encode('utf8')) return (self.pub_tr if tx else self.pub_na).publish(message, exchange, routing_key.encode('utf8'))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment