From: Alfredo Deza Date: Mon, 14 Oct 2013 20:10:11 +0000 (-0400) Subject: avoid Message attribute errors, bump execnet X-Git-Tag: 0.0.6 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=ee0ef7c2d5f7cba770ef76464c987ca05ad62aa1;p=remoto.git avoid Message attribute errors, bump execnet --- diff --git a/remoto/lib/execnet/__init__.py b/remoto/lib/execnet/__init__.py index 45309e7..2b8a281 100644 --- a/remoto/lib/execnet/__init__.py +++ b/remoto/lib/execnet/__init__.py @@ -3,7 +3,7 @@ execnet: pure python lib for connecting to local and remote Python Interpreters. (c) 2012, Holger Krekel and others """ -__version__ = '1.1' +__version__ = '1.1-ad1' from . import apipkg diff --git a/remoto/lib/execnet/gateway_base.py b/remoto/lib/execnet/gateway_base.py index f60b65b..2313bab 100644 --- a/remoto/lib/execnet/gateway_base.py +++ b/remoto/lib/execnet/gateway_base.py @@ -322,15 +322,16 @@ class Channel(object): # the remote channel is already in "deleted" state, nothing to do pass else: - # state transition "opened" --> "deleted" - if self._items is None: # has_callback - msgcode = Message.CHANNEL_LAST_MESSAGE - else: - msgcode = Message.CHANNEL_CLOSE - try: - self.gateway._send(msgcode, self.id) - except (IOError, ValueError): # ignore problems with sending - pass + if Message is not None: + # state transition "opened" --> "deleted" + if self._items is None: # has_callback + msgcode = Message.CHANNEL_LAST_MESSAGE + else: + msgcode = Message.CHANNEL_CLOSE + try: + self.gateway._send(msgcode, self.id) + except (IOError, ValueError): # ignore problems with sending + pass def _getremoteerror(self): try: