Skip to content

Commit d16dc17

Browse files
author
Alexander Smishlajev
committed
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.
1 parent ad4c09f commit d16dc17

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

roundup/configuration.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Roundup Issue Tracker configuration support
22
#
3-
# $Id: configuration.py,v 1.2 2004-07-25 12:44:16 a1s Exp $
3+
# $Id: configuration.py,v 1.3 2004-07-25 13:12:59 a1s Exp $
44
#
55
__docformat__ = "restructuredtext"
66

@@ -9,7 +9,7 @@
99
import time
1010
import ConfigParser
1111

12-
from roundup import instance, rlog
12+
from roundup import rlog
1313
# XXX i don't think this module needs string translation, does it?
1414

1515
### Exceptions
@@ -543,9 +543,10 @@ def init_logging(self):
543543
try:
544544
import logging
545545
_logging = logging
546-
except ImportError, msg:
547-
raise instance.TrackerError, \
548-
'Python logging module unavailable: %s' % msg
546+
except ImportError, _err:
547+
_option = self._get_option("LOGGING_CONFIG")
548+
raise OptionValueError(_option, _file,
549+
"Python logging module is not available: %s" % _err)
549550
_logging.fileConfig(_file)
550551
else:
551552
_logging = rlog.BasicLogging()

0 commit comments

Comments
 (0)