diff options
author | Marco Pesenti Gritti <marco@localhost.localdomain> | 2006-08-11 23:29:55 (GMT) |
---|---|---|
committer | Marco Pesenti Gritti <marco@localhost.localdomain> | 2006-08-11 23:29:55 (GMT) |
commit | fc1aefc72c35b830ae36e5f29fce31947eb70dd7 (patch) | |
tree | 3752aee2f4534d2ff31188d6cd0f12e2ae61b53b /shell/PresenceService | |
parent | c5fb39875c9a6609868ef7295193840df183a6f4 (diff) |
Use dbus-launch with the --exit-with-session. dbus not exiting still not fully solved.
Diffstat (limited to 'shell/PresenceService')
-rw-r--r-- | shell/PresenceService/PresenceService.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/shell/PresenceService/PresenceService.py b/shell/PresenceService/PresenceService.py index e1851ab..997340a 100644 --- a/shell/PresenceService/PresenceService.py +++ b/shell/PresenceService/PresenceService.py @@ -212,7 +212,7 @@ class PresenceServiceDBusHelper(dbus.service.Object): in_signature="o", out_signature="") def unregisterService(self, service_op): found_serv = None - serv = self._parent.get_services() + services = self._parent.get_services() for serv in services: if serv.object_path() == service_op: found_serv = serv @@ -688,12 +688,13 @@ class PresenceService(object): if stype in self._registered_service_types: self._registered_service_types.remove(stype) - - def main(): loop = gobject.MainLoop() ps = PresenceService() - loop.run() + try: + loop.run() + except KeyboardInterrupt: + print 'Ctrl+C pressed, exiting...' if __name__ == "__main__": main() |