- Timestamp:
- 05/14/12 16:54:33 (12 years ago)
- Location:
- trunk/sara_cmt
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sara_cmt/bin/cmt
r14154 r14171 81 81 #TODO: think about a (better) way to make this dynamic: 82 82 import site 83 configfile = '%s/etc/cmt/cmt.conf' % site.sys.prefix 83 84 if site.sys.prefix in [ '/usr', '/' ]: 85 ETC_PREPEND = '' 86 else: 87 ETC_PREPEND = site.sys.prefix 88 89 configfile = '%s/etc/cmt/cmt.conf' % ETC_PREPEND 84 90 config_parser = ConfigParser.ConfigParser() 85 91 config_parser.optionxform = lambda x: x -
trunk/sara_cmt/sara_cmt/logger.py
r14154 r14171 15 15 #TODO: think about a (better) way to make this dynamic: 16 16 import site 17 logging.config.fileConfig('%s/etc/cmt/logging.conf'%site.sys.prefix) 17 18 if site.sys.prefix in [ '/usr', '/' ]: 19 ETC_PREPEND = '' 20 else: 21 ETC_PREPEND = site.sys.prefix 22 23 logging.config.fileConfig('%s/etc/cmt/logging.conf'%ETC_PREPEND) 18 24 __shared_state['logger'] = logging.getLogger('cli') 19 25 -
trunk/sara_cmt/sara_cmt/settings.py
r14165 r14171 4 4 from socket import gethostbyname_ex 5 5 6 if site.sys.prefix in [ '/usr', '/' ]: 7 ETC_PREPEND = '' 8 else: 9 ETC_PREPEND = site.sys.prefix 10 6 11 # Path's customizable through virtualenv 7 sample_configfile = '%s/etc/cmt/cmt.conf.sample' % site.sys.prefix8 configfile = '%s/etc/cmt/cmt.conf' % site.sys.prefix12 sample_configfile = '%s/etc/cmt/cmt.conf.sample' % ETC_PREPEND 13 configfile = '%s/etc/cmt/cmt.conf' % ETC_PREPEND 9 14 10 15 def count_configlines( filename ): … … 248 253 #TODO: think about a (better) way to make this dynamic: 249 254 #TODO: get this out of the settings.py, since it should be in the client config 250 CMT_TEMPLATES_DIR = '%s/etc/cmt/templates' % site.sys.prefix255 CMT_TEMPLATES_DIR = '%s/etc/cmt/templates' % ETC_PREPEND 251 256 252 257 # Templates for the CMT web-frontend.
Note: See TracChangeset
for help on using the changeset viewer.