From 7740280c458564d2803eb1bb57d0ed0c0035d109 Mon Sep 17 00:00:00 2001 From: Ted Ross Date: Tue, 11 Nov 2008 16:52:44 +0000 Subject: QPID-1448 - Management APIs and CLI tools are not unicode safe The management APIs (old and new) now use unicode strings as the default. The CLI utilities now use the preferred shell encoding to support multibyte characters in the command line and in managed objects. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@713079 13f79535-47bb-0310-9956-ffa450edef68 --- python/qpid/management.py | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'python/qpid/management.py') diff --git a/python/qpid/management.py b/python/qpid/management.py index 863e25e24c..e91eb48517 100644 --- a/python/qpid/management.py +++ b/python/qpid/management.py @@ -479,7 +479,7 @@ class managementClient: elif typecode == 5: data = codec.read_uint8 () elif typecode == 6: - data = str (codec.read_str8 ()) + data = codec.read_str8 () elif typecode == 7: data = codec.read_str16 () elif typecode == 8: # ABSTIME @@ -534,7 +534,7 @@ class managementClient: def handleMethodReply (self, ch, codec, sequence): status = codec.read_uint32 () - sText = str (codec.read_str16 ()) + sText = codec.read_str16 () data = self.seqMgr.release (sequence) if data == None: @@ -570,7 +570,7 @@ class managementClient: def handleCommandComplete (self, ch, codec, seq): code = codec.read_uint32 () - text = str (codec.read_str8 ()) + text = codec.read_str8 () data = (seq, code, text) context = self.seqMgr.release (seq) if context == "outstanding": @@ -597,7 +597,7 @@ class managementClient: ch.send ("qpid.management", smsg) def handlePackageInd (self, ch, codec): - pname = str (codec.read_str8 ()) + pname = codec.read_str8 () if pname not in self.packages: self.packages[pname] = {} @@ -614,8 +614,8 @@ class managementClient: kind = codec.read_uint8() if kind != 1: # This API doesn't handle new-style events return - pname = str (codec.read_str8()) - cname = str (codec.read_str8()) + pname = codec.read_str8() + cname = codec.read_str8() hash = codec.read_bin128() if pname not in self.packages: return @@ -642,10 +642,10 @@ class managementClient: return timestamp = codec.read_uint64() objId = objectId(codec) - packageName = str(codec.read_str8()) - className = str(codec.read_str8()) + packageName = codec.read_str8() + className = codec.read_str8() hash = codec.read_bin128() - name = str(codec.read_str8()) + name = codec.read_str8() classKey = (packageName, className, hash) if classKey not in self.schema: return; @@ -669,8 +669,8 @@ class managementClient: kind = codec.read_uint8() if kind != 1: # This API doesn't handle new-style events return - packageName = str (codec.read_str8 ()) - className = str (codec.read_str8 ()) + packageName = codec.read_str8 () + className = codec.read_str8 () hash = codec.read_bin128 () configCount = codec.read_uint16 () instCount = codec.read_uint16 () @@ -808,8 +808,8 @@ class managementClient: if cls == 'I' and self.instCb == None: return - packageName = str (codec.read_str8 ()) - className = str (codec.read_str8 ()) + packageName = codec.read_str8 () + className = codec.read_str8 () hash = codec.read_bin128 () classKey = (packageName, className, hash) -- cgit v1.2.1