Skip to content

Commit

Permalink
Python 2.6 doesn't support logging.captureWarnings
Browse files Browse the repository at this point in the history
  • Loading branch information
amol- committed Feb 5, 2014
1 parent 033409e commit 75add36
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion gearbox/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 75add36

Please sign in to comment.