(c) 2012, Holger Krekel and others
"""
-__version__ = '1.1-ad2'
+__version__ = '1.1-ad3'
from . import apipkg
# CHANGELOG
#
+# 1.1-ad3: Catch more `TypeError` if the connection is closing but the channel attempts
+# to write. We now check is `struct.pack` is not None to proceed.
+# Issue: https://bitbucket.org/hpk42/execnet/issue/22/structpack-can-be-none-sometimes-spits
+#
# 1.1-ad2: Allow for `sudo python` on local popen gateways
# Issue: https://bitbucket.org/hpk42/execnet/issue/21/support-sudo-on-local-popen
#
return Message(msgtype, channel, io.read(payload))
def to_io(self, io):
- header = struct.pack('!bii', self.msgcode, self.channelid, len(self.data))
- io.write(header+self.data)
+ if struct.pack is not None:
+ header = struct.pack('!bii', self.msgcode, self.channelid, len(self.data))
+ io.write(header+self.data)
def received(self, gateway):
self._types[self.msgcode](self, gateway)