From a938e686d09cf05417baf7f79581632bd64b5d1b Mon Sep 17 00:00:00 2001 From: Jelte Jansen Date: Tue, 1 Dec 2009 16:23:52 +0000 Subject: [PATCH] be lenient on the receiving end whether env["msg"] is a str or a bytearray (until we use the new wireformat i guess) git-svn-id: svn://bind10.isc.org/svn/bind10/branches/parkinglot@327 e5f2f494-b856-4b98-b285-d166d9295462 --- src/lib/cc/python/ISC/CC/session.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/lib/cc/python/ISC/CC/session.py b/src/lib/cc/python/ISC/CC/session.py index b285127c74..6b1d434afd 100644 --- a/src/lib/cc/python/ISC/CC/session.py +++ b/src/lib/cc/python/ISC/CC/session.py @@ -137,7 +137,10 @@ class Session: # return none twice to match normal return value # (so caller won't get a type error on no data) return (None, None) - msg = Message.from_wire(env["msg"].encode('ascii')) + if type(env["msg"]) != bytearray: + msg = Message.from_wire(env["msg"].encode('ascii')) + else: + msg = Message.from_wire(env["msg"]) return (msg, env) def group_reply(self, routing, msg):