mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-26 18:18:25 +00:00
Updated for python 3
This commit is contained in:
parent
22154dee5c
commit
5d82068218
@ -41,7 +41,7 @@ class ASCommandResponse:
|
|||||||
raise ValueError("Empty WBXML body passed")
|
raise ValueError("Empty WBXML body passed")
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
self.xmlString = None
|
self.xmlString = None
|
||||||
raise ValueError("Error: {0}".format(e.message))
|
raise ValueError("Error: {0}".format(e))
|
||||||
|
|
||||||
def getWBXMLBytes(self):
|
def getWBXMLBytes(self):
|
||||||
return self.wbxmlBytes
|
return self.wbxmlBytes
|
||||||
|
@ -40,7 +40,7 @@ class ASWBXMLByteQueue(Queue):
|
|||||||
Queue.__init__(self)
|
Queue.__init__(self)
|
||||||
|
|
||||||
for byte in wbxmlBytes:
|
for byte in wbxmlBytes:
|
||||||
self.put(ord(byte))
|
self.put(byte)
|
||||||
self.bytesEnqueued += 1
|
self.bytesEnqueued += 1
|
||||||
|
|
||||||
|
|
||||||
|
@ -39,12 +39,12 @@ class ASWBXMLCodePage:
|
|||||||
self.tagLookup[tag] = token
|
self.tagLookup[tag] = token
|
||||||
|
|
||||||
def getToken(self, tag):
|
def getToken(self, tag):
|
||||||
if self.tagLookup.has_key(tag):
|
if tag in self.tagLookup:
|
||||||
return self.tagLookup[tag]
|
return self.tagLookup[tag]
|
||||||
return 0xFF
|
return 0xFF
|
||||||
|
|
||||||
def getTag(self, token):
|
def getTag(self, token):
|
||||||
if self.tokenLookup.has_key(token):
|
if token in self.tokenLookup:
|
||||||
return self.tokenLookup[token]
|
return self.tokenLookup[token]
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user