From d6d566e39bdb9d876d0dd3a9ad4a69bb8f904331 Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Mon, 7 Mar 2011 19:57:55 +0100 Subject: pylint --- src/poezio.py | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) (limited to 'src/poezio.py') 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() -- cgit v1.2.3