summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/poezio.py23
1 files changed, 14 insertions, 9 deletions
diff --git a/src/poezio.py b/src/poezio.py
index bc93ec62..334357e5 100644
--- a/src/poezio.py
+++ b/src/poezio.py
@@ -26,17 +26,22 @@ sys.path.append(os.path.dirname(os.path.abspath(__file__)))
import signal
import logging
-from config import config, options
+from config import options
import singleton
import core
-import connection
-if __name__ == '__main__':
+def main():
+ """
+ Enter point
+ """
signal.signal(signal.SIGINT, signal.SIG_IGN) # ignore ctrl-c
if options.debug:
- logging.basicConfig(filename=options.debug,level=logging.DEBUG)
- the_core = singleton.Singleton(core.Core)
- the_core.start()
- if not the_core.xmpp.start(): # Connect to remote server
- the_core.on_failed_connection()
- the_core.main_loop() # Refresh the screen, wait for user events etc
+ logging.basicConfig(filename=options.debug, level=logging.DEBUG)
+ cocore = singleton.Singleton(core.Core)
+ cocore.start()
+ if not cocore.xmpp.start(): # Connect to remote server
+ cocore.on_failed_connection()
+ cocore.main_loop() # Refresh the screen, wait for user events etc
+
+if __name__ == '__main__':
+ main()