Mercurial > p > roundup > code
diff roundup/configuration.py @ 2620:92c820cfcc4a
cannot import roundup.instance because of import loop.
hence cannot raise TrackerError defined in that module.
instead, raise OptionValueError if standard python logging is
requested but unavailable.
| author | Alexander Smishlajev <a1s@users.sourceforge.net> |
|---|---|
| date | Sun, 25 Jul 2004 13:12:59 +0000 |
| parents | 4b4ca3bd086b |
| children | 5a27c34e99ef |
line wrap: on
line diff
--- a/roundup/configuration.py Sun Jul 25 12:44:16 2004 +0000 +++ b/roundup/configuration.py Sun Jul 25 13:12:59 2004 +0000 @@ -1,6 +1,6 @@ # Roundup Issue Tracker configuration support # -# $Id: configuration.py,v 1.2 2004-07-25 12:44:16 a1s Exp $ +# $Id: configuration.py,v 1.3 2004-07-25 13:12:59 a1s Exp $ # __docformat__ = "restructuredtext" @@ -9,7 +9,7 @@ import time import ConfigParser -from roundup import instance, rlog +from roundup import rlog # XXX i don't think this module needs string translation, does it? ### Exceptions @@ -543,9 +543,10 @@ try: import logging _logging = logging - except ImportError, msg: - raise instance.TrackerError, \ - 'Python logging module unavailable: %s' % msg + except ImportError, _err: + _option = self._get_option("LOGGING_CONFIG") + raise OptionValueError(_option, _file, + "Python logging module is not available: %s" % _err) _logging.fileConfig(_file) else: _logging = rlog.BasicLogging()
