- Timestamp:
- 04/27/12 16:15:12 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sara_cmt/sara_cmt/settings.py
r14156 r14157 1 1 2 import os, sys, ConfigParser 2 import os, sys, ConfigParser, site 3 3 4 4 from socket import gethostbyname_ex 5 5 6 configfile = '%s/etc/cmt/cmt.conf' % site.sys.prefix 7 6 8 config = ConfigParser.RawConfigParser() 7 config.read( '/etc/cmt/cmt.conf')9 config.read( configfile ) 8 10 9 11 try: … … 14 16 DATABASE_NAME = config.get('database', 'NAME') 15 17 16 except ConfigParser.NoOptionError, details:18 except (ConfigParser.NoOptionError, ConfigParser.NoSectionError), details: 17 19 18 20 print 'Config file error: %s' %str(details)
Note: See TracChangeset
for help on using the changeset viewer.