Commit 94c15b1c authored by Devaev Maxim's avatar Devaev Maxim

Moved startup code to Application

parent 6c1c5923
import sys
import os
from settingsd import const
from settingsd import application
from settingsd import logger
if __name__ == "__main__" :
app = application.Application()
app.init()
app.exec_()
logger.message(const.LOG_LEVEL_INFO, "Initialized")
try :
app.run()
except KeyboardInterrupt :
app.close()
logger.message(const.LOG_LEVEL_INFO, "Closed")
......@@ -11,6 +11,7 @@ import gobject
import const
import config
import validators
import logger
#####
......@@ -25,6 +26,15 @@ class Application(object) :
self._main_loop = gobject.MainLoop()
def exec_(self) :
self.init()
logger.message(const.LOG_LEVEL_INFO, "Initialized")
try :
self.run()
except KeyboardInterrupt :
self.close()
logger.message(const.LOG_LEVEL_INFO, "Closed")
def init(self) :
self.loadModules()
self.loadConfigs()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment