summaryrefslogtreecommitdiff
path: root/ebus/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'ebus/__init__.py')
-rw-r--r--ebus/__init__.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/ebus/__init__.py b/ebus/__init__.py
index 65f47a1..9ac981d 100644
--- a/ebus/__init__.py
+++ b/ebus/__init__.py
@@ -110,23 +110,23 @@ class EbusXMLMixin(object):
@staticmethod
def address_to_type(address):
d=[dev.get("type") for dev in EbusXMLMixin.ebus_xml.xpath("/ebus/devices/device[@address=$address]",
- address="0x%.2x"%address)]
+ address="#x%.2x"%address)]
return len(d)>0 and d[0] or None
def _get_packet(self):
p=EbusXMLMixin.ebus_xml.xpath("/ebus/packets/packet[@primary=$primary and @secondary=$secondary]",
- primary="0x%.2x"%self.primary_command,
- secondary="0x%.2x"%self.secondary_command)
+ primary="#x%.2x"%self.primary_command,
+ secondary="#x%.2x"%self.secondary_command)
return len(p)>0 and p[0] or None
def _get_source(self):
s=EbusXMLMixin.ebus_xml.xpath("/ebus/devices/device[@address=$address]",
- address="0x%.2x"%self.source)
+ address="#x%.2x"%self.source)
return len(s)>0 and s[0] or None
def _get_destination(self):
d=EbusXMLMixin.ebus_xml.xpath("/ebus/devices/device[@address=$address]",
- address="0x%.2x"%self.destination)
+ address="#x%.2x"%self.destination)
return len(d)>0 and d[0] or None
def name(self):