Mercurial > libervia-backend
comparison src/core/sat_main.py @ 365:efbfccfed623
core: local_dir moved to config file
- ~/.sat.conf added to potential config file location
- removed useless profile param from getConfig
author | Goffi <goffi@goffi.org> |
---|---|
date | Sat, 18 Jun 2011 17:56:59 +0200 |
parents | 312ca6f9d84a |
children | a617af506154 |
comparison
equal
deleted
inserted
replaced
364:312ca6f9d84a | 365:efbfccfed623 |
---|---|
20 """ | 20 """ |
21 | 21 |
22 CONST = { | 22 CONST = { |
23 'client_name' : u'SàT (Salut à toi)', | 23 'client_name' : u'SàT (Salut à toi)', |
24 'client_version' : u'0.2.0D', #Please add 'D' at the end for dev versions | 24 'client_version' : u'0.2.0D', #Please add 'D' at the end for dev versions |
25 'local_dir' : '~/.sat' | |
26 } | 25 } |
27 | 26 |
28 from twisted.application import service | 27 from twisted.application import service |
29 from twisted.internet import defer | 28 from twisted.internet import defer |
30 | 29 |
105 self.plugins = {} | 104 self.plugins = {} |
106 self.menus = {} #used to know which new menus are wanted by plugins | 105 self.menus = {} #used to know which new menus are wanted by plugins |
107 | 106 |
108 self.memory=Memory(self) | 107 self.memory=Memory(self) |
109 | 108 |
110 local_dir = os.path.expanduser(self.get_const('local_dir')) | 109 local_dir = self.memory.getConfig('', 'local_dir') |
111 if not os.path.exists(local_dir): | 110 if not os.path.exists(local_dir): |
112 os.makedirs(local_dir) | 111 os.makedirs(local_dir) |
113 | 112 |
114 self.trigger = TriggerManager() #trigger are used to change SàT behaviour | 113 self.trigger = TriggerManager() #trigger are used to change SàT behaviour |
115 | 114 |