diff options
Diffstat (limited to 'ebus/__init__.py')
-rw-r--r-- | ebus/__init__.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ebus/__init__.py b/ebus/__init__.py index 58192b9..7b8c8ed 100644 --- a/ebus/__init__.py +++ b/ebus/__init__.py @@ -44,15 +44,15 @@ class EbusPacket(object): self.primary_command, self.secondary_command)) - def _get_source_name(self): + def get_source_name(self): s=EbusPacket.ebus_xml.xpath("/ebus/devices/device[@address=$address]", address="#x%.2x"%self.source) - return len(s)>0 and s[0] or None + return len(s)>0 and s[0].get("name") or None - def _get_destination_name(self): + def get_destination_name(self): d=EbusPacket.ebus_xml.xpath("/ebus/devices/device[@address=$address]", address="#x%.2x"%self.destination) - return len(d)>0 and d[0] or None + return len(d)>0 and d[0].get("name") or None def name(self): return self.get_packet_description().get("name") |