Fixed bug when compiling
authorLaurent Bessard
Tue, 24 Sep 2013 15:18:25 +0200
changeset 2159 93797d4303a3
parent 2158 7132aa34188d
child 2160 75349c51a34b
Fixed bug when compiling
etherlab/etherlab.py
--- a/etherlab/etherlab.py	Tue Sep 24 00:50:02 2013 +0200
+++ b/etherlab/etherlab.py	Tue Sep 24 15:18:25 2013 +0200
@@ -25,7 +25,11 @@
 def extract_param(el):
     if el.tag == "Index":
         return "#x%4.4X" % int(el.text)
-    if el.tag == "PDOMapping":
+    elif el.tag == "BitSize":
+        if el.text is None:
+            return 0
+        return int(el.text)
+    elif el.tag == "PDOMapping":
         if el.text is None:
             return ""
         return el.text.upper()