Stick main code into main()
This commit is contained in:
parent
6658cfba80
commit
58ed74bae6
@ -652,6 +652,8 @@ class ChatShell(dbus.service.Object):
|
||||
def send_text_message(self, message):
|
||||
self._group_chat.send_text_message(message)
|
||||
|
||||
|
||||
def main():
|
||||
if len(sys.argv) > 1 and sys.argv[1] == "--console":
|
||||
sys.stdout = LogWriter("Chat")
|
||||
sys.stderr = LogWriter("Chat")
|
||||
@ -662,3 +664,6 @@ try:
|
||||
gtk.main()
|
||||
except KeyboardInterrupt:
|
||||
pass
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
Loading…
Reference in New Issue
Block a user