diff options
-rw-r--r-- | python/qpid/session.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/python/qpid/session.py b/python/qpid/session.py index 22a052754b..071d4dc817 100644 --- a/python/qpid/session.py +++ b/python/qpid/session.py @@ -146,7 +146,8 @@ class Session(command_invoker()): if self._closing: raise SessionClosed() - if self.channel == None: + ch = self.channel + if ch == None: raise SessionDetached() if op == MessageTransfer: @@ -162,7 +163,7 @@ class Session(command_invoker()): cmd = op(*args, **kwargs) cmd.sync = self.auto_sync or cmd.sync self.need_sync = not cmd.sync - cmd.channel = self.channel.id + cmd.channel = ch.id if op.RESULT: result = Future(exception=SessionException) |