Commit fadb9072 authored by Anders Blomdell's avatar Anders Blomdell Committed by Sven Gestegård Robertz
Browse files

Removed (hopefully) un-needed stringification

parent 9d6db08c
......@@ -917,8 +917,8 @@ class Decoder(Codec):
self.version = version
self.handlers = {}
def register_handler(self, sig, handler):
self.handlers[str(sig)] = handler
def register_handler(self, decl, handler):
self.handlers[decl] = handler
def unpack(self, format):
size = packer.calcsize(format)
......@@ -955,8 +955,8 @@ class Decoder(Codec):
data,decl = self.decode()
if decl:
if data != None:
if str(decl) in self.handlers:
handler = self.handlers[str(decl)]
if decl in self.handlers:
handler = self.handlers[decl]
handler(data)
else:
print ("No handler for %s" % decl.name )
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment