changeset 20303:d130a8a8e354

applied changes from c699de7eec5194554b5fcb885019835fb902d95a through 3c351ab69ebec23d5a98c0193423e1f8281ece6b
author Luke Schierer <lschiere@pidgin.im>
date Fri, 19 Oct 2007 16:57:07 +0000
parents 67a7e0868618
children 64acdb427851
files libpurple/purple-remote
diffstat 1 files changed, 10 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/purple-remote	Fri Oct 19 16:54:41 2007 +0000
+++ b/libpurple/purple-remote	Fri Oct 19 16:57:07 2007 +0000
@@ -9,7 +9,12 @@
 
 xml.dom.minidom.Element.all   = xml.dom.minidom.Element.getElementsByTagName
 
-obj = dbus.SessionBus().get_object("im.pidgin.purple.PurpleService", "/im/pidgin/purple/PurpleObject")
+obj = None
+try:
+    obj = dbus.SessionBus().get_object("im.pidgin.purple.PurpleService", "/im/pidgin/purple/PurpleObject")
+except:
+    pass
+
 purple = dbus.Interface(obj, "im.pidgin.purple.PurpleInterface")
 
 class CheckedObject:
@@ -212,7 +217,10 @@
 
 if len(sys.argv) == 1:
     show_help()
-
+elif (obj == None):
+    print "No existing libpurple instance detected."
+    sys.exit(1);
+    
 for arg in sys.argv[1:]:
     output = execute(arg)