Commit f8c9b8c6 authored by Devaev Maxim's avatar Devaev Maxim

Added startup and application instances to runtime

parent c66117dd
[settingsd]
bus_type = session
log_level = 2
enabled = yes
[hello]
enabled = yes
......@@ -28,6 +28,8 @@ ConfigDictObject = {
"log_use_colors" :(const.DEFAULT_LOG_USE_COLORS_FLAG, validators.validBool)
},
RUNTIME_SECTION : {
"application" : (None, None),
"startup" : (None, None),
"bus_name" : (None, None),
"use_syslog" : (False, None)
}
......
......@@ -63,6 +63,11 @@ class Startup(object) :
if self._log_level != None :
config.setValue(config.APPLICATION_SECTION, "log_level", self._log_level)
config.setValue(config.RUNTIME_SECTION, "application", self._app)
config.setValue(config.RUNTIME_SECTION, "startup", self)
###
def runInteractive(self) :
try :
self._app.loadModules()
......@@ -97,8 +102,7 @@ class Startup(object) :
umask = ( 077 if os.getuid() == 0 else None )
daemon.startDaemon(self.runInteractive, work_dir_path, umask)
### Handlers ###
###
def quit(self, signum = None, frame = None) :
if signum != None :
......
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