Browse files

handle no logging element in yml

  • Loading branch information...
1 parent a7ec702 commit 38a5460b177535550448482b87c27e02c9f13602 @newbrough newbrough committed Mar 7, 2013
Showing with 4 additions and 3 deletions.
  1. +1 −1 setup.py
  2. +3 −2 src/ooi/logging/configure.py
View
2 setup.py
@@ -1,7 +1,7 @@
from distutils.core import setup
setup(name='utilities',
- version='2013.03.07',
+ version='2013.03.07.01',
author='Jonathan Newbrough',
author_email='jonathan.newbrough@gyregroup.com',
url='https://github.com/newbrough/utilities',
View
5 src/ooi/logging/configure.py
@@ -133,8 +133,9 @@ def set_level(self, scope, level, recursive=False):
config['root']['level'] = level
if recursive:
config['loggers'] = {}
- for name in self.current_config['loggers'].keys():
- config['loggers'][name] = NOTSET
+ if 'loggers' in self.current_config:
+ for name in self.current_config['loggers'].keys():
+ config['loggers'][name] = NOTSET
self.add_configuration(config)
def set_all_levels(self, level):

0 comments on commit 38a5460

Please sign in to comment.