~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to ivle/config/__init__.py

  • Committer: Matt Giuca
  • Date: 2010-07-20 12:16:51 UTC
  • mto: This revision was merged to the branch mainline in revision 1818.
  • Revision ID: matt.giuca@gmail.com-20100720121651-rgeeztj6jn1tsrou
Submit page: No longer disables the radio button for closed projects.
Displays them in red rather than grey (grey implies disabled, red implies caution).
Added notice that the deadline has passed, but submission can still be done with a penalty.

Show diffs side-by-side

added added

removed removed

Lines of Context:
38
38
 
39
39
def search_confdir():
40
40
    """
41
 
    Search for the config file, and return it as a filename.
 
41
    Search for the config file, and return the directory it is in.
42
42
    1. Environment var IVLECONF (path to directory)
43
 
    2. /etc/ivle/ivle.conf
 
43
    2. /etc/ivle
44
44
    Raises a ConfigError on error.
45
45
    """
46
46
    if 'IVLECONF' in os.environ:
82
82
            confdir = search_confdir()
83
83
            conffile = os.path.join(confdir, 'ivle.conf')
84
84
            super(Config, self).__init__(infile=conffile, configspec=specfile,
 
85
                                         interpolation='template',
85
86
                                         *args, **kwargs)
86
87
            # XXX This doesn't raise errors if it doesn't validate
87
88
            self.validate(Validator())