From fadb9072356aff848589914e054c7418947d8d74 Mon Sep 17 00:00:00 2001
From: Anders Blomdell <anders.blomdell@control.lth.se>
Date: Fri, 7 Aug 2015 19:51:16 +0200
Subject: [PATCH] Removed (hopefully) un-needed stringification

---
 lib/python/labcomm2014/LabComm.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/lib/python/labcomm2014/LabComm.py b/lib/python/labcomm2014/LabComm.py
index b00f0ee..86ce169 100644
--- a/lib/python/labcomm2014/LabComm.py
+++ b/lib/python/labcomm2014/LabComm.py
@@ -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 )
-- 
GitLab