Don't traceback when somebody doesn't advertise their color
This commit is contained in:
parent
3f50668494
commit
d2c0829165
@ -74,7 +74,9 @@ class BuddyDBusHelper(dbus.service.Object):
|
||||
props['name'] = self._parent.get_name()
|
||||
props['ip4_address'] = self._parent.get_address()
|
||||
props['owner'] = self._parent.is_owner()
|
||||
props['color'] = self._parent.get_color()
|
||||
color = self._parent.get_color()
|
||||
if color:
|
||||
props['color'] = self._parent.get_color()
|
||||
return props
|
||||
|
||||
|
||||
|
@ -35,6 +35,8 @@ class Buddy(gobject.GObject):
|
||||
self._buddy.connect_to_signal('LeftActivity', self._left_activity_cb)
|
||||
self._buddy.connect_to_signal('PropertyChanged', self._property_changed_cb)
|
||||
self._properties = self._buddy.getProperties()
|
||||
if not self._properties.has_key('color'):
|
||||
self._properties['color'] = "#deadbe"
|
||||
|
||||
def object_path(self):
|
||||
return self._object_path
|
||||
|
Loading…
Reference in New Issue
Block a user