Permalink
Browse files

Python 2.6 doesn't support logging.captureWarnings

  • Loading branch information...
1 parent 033409e commit 75add368ad8c3ff3b1e2fa75f690a4aba9be468d @amol- amol- committed Feb 5, 2014
Showing with 4 additions and 1 deletion.
  1. +4 −1 gearbox/main.py
View
@@ -23,7 +23,10 @@ def __init__(self):
def configure_logging(self):
if self.options.debug:
warnings.simplefilter('default')
- logging.captureWarnings(True)
+ try:
+ logging.captureWarnings(True)
+ except AttributeError:
+ pass
root_logger = logging.getLogger('')
root_logger.setLevel(logging.INFO)

0 comments on commit 75add36

Please sign in to comment.