Enable the console only when running from source path.

This commit is contained in:
Marco Pesenti Gritti
2006-05-17 00:12:01 -04:00
parent 53ccec5267
commit 2ae62db4cc
4 changed files with 25 additions and 14 deletions
+4 -3
View File
@@ -398,9 +398,10 @@ class ChatShell(dbus.service.Object):
@dbus.service.method('com.redhat.Sugar.ChatShell')
def send_message(self, message):
self._group_chat.send_message(message)
sys.stdout = LogWriter("Chat")
sys.stderr = LogWriter("Chat")
if len(sys.argv) > 1 and sys.argv[1] == "--console":
sys.stdout = LogWriter("Chat")
sys.stderr = LogWriter("Chat")
ChatShell.get_instance().open_group_chat()
gtk.main()