mirror of
https://github.com/MCV-Software/TWBlue.git
synced 2024-11-26 12:53:12 -06:00
Allow to specify alternative configuration specs for sessions
This commit is contained in:
parent
3a5c1c10d3
commit
7c34204d17
@ -43,6 +43,8 @@ class baseSession(object):
|
|||||||
self.logged = False
|
self.logged = False
|
||||||
self.settings = None
|
self.settings = None
|
||||||
self.db={}
|
self.db={}
|
||||||
|
# Config specification file.
|
||||||
|
self.config_spec = "conf.defaults"
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def is_logged(self):
|
def is_logged(self):
|
||||||
@ -52,7 +54,7 @@ class baseSession(object):
|
|||||||
""" Get settings for a session."""
|
""" Get settings for a session."""
|
||||||
file_ = "%s/session.conf" % (self.session_id,)
|
file_ = "%s/session.conf" % (self.session_id,)
|
||||||
log.debug("Creating config file %s" % (file_,))
|
log.debug("Creating config file %s" % (file_,))
|
||||||
self.settings = config_utils.load_config(os.path.join(paths.config_path(), file_), os.path.join(paths.app_path(), "Conf.defaults"))
|
self.settings = config_utils.load_config(os.path.join(paths.config_path(), file_), os.path.join(paths.app_path(), self.config_spec))
|
||||||
self.init_sound()
|
self.init_sound()
|
||||||
self.load_persistent_data()
|
self.load_persistent_data()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user