summaryrefslogtreecommitdiff
path: root/ebus/__init__.py
diff options
context:
space:
mode:
authorRandom Hacker <random_hacker@xapek.org>2010-08-18 23:46:18 +0200
committerRandom Hacker <random_hacker@xapek.org>2010-08-18 23:46:18 +0200
commitde1bbfc28dd9dcc76f8d4a34e1524b1f3a594fdb (patch)
tree0281f29ff36bea9c4f981ca2756461fe32f0d2e4 /ebus/__init__.py
parent7ff580a6fe60f7e3ea160f7b181ff0fa934453ce (diff)
downloadebus-alt-de1bbfc28dd9dcc76f8d4a34e1524b1f3a594fdb.tar.gz
ebus-alt-de1bbfc28dd9dcc76f8d4a34e1524b1f3a594fdb.zip
running with pgsql
Diffstat (limited to 'ebus/__init__.py')
-rw-r--r--ebus/__init__.py8
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")