Merge pull request #2106 from davidpshaw/python_3_to_master

Updated for python 3
This commit is contained in:
Maximilian Hils 2017-03-07 12:12:47 +01:00 committed by GitHub
commit 96b798615c
3 changed files with 4 additions and 4 deletions

View File

@ -41,7 +41,7 @@ class ASCommandResponse:
raise ValueError("Empty WBXML body passed")
except Exception as e:
self.xmlString = None
raise ValueError("Error: {0}".format(e.message))
raise ValueError("Error: {0}".format(e))
def getWBXMLBytes(self):
return self.wbxmlBytes

View File

@ -40,7 +40,7 @@ class ASWBXMLByteQueue(Queue):
Queue.__init__(self)
for byte in wbxmlBytes:
self.put(ord(byte))
self.put(byte)
self.bytesEnqueued += 1

View File

@ -39,12 +39,12 @@ class ASWBXMLCodePage:
self.tagLookup[tag] = token
def getToken(self, tag):
if self.tagLookup.has_key(tag):
if tag in self.tagLookup:
return self.tagLookup[tag]
return 0xFF
def getTag(self, token):
if self.tokenLookup.has_key(token):
if token in self.tokenLookup:
return self.tokenLookup[token]
return None