Skip to content

Commit

Permalink
Minor _set_logging_level() simplification
Browse files Browse the repository at this point in the history
  • Loading branch information
Jérôme Lafréchoux committed Jun 25, 2013
1 parent f31afbc commit aad4ccf
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions oemgateway.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,11 +163,9 @@ def _set_logging_level(self, level):
"""
try:
loglevel = getattr(logging, level)
except AttributeError:
self._log.error('Logging level %s invalid' % level)
else:
self._log.setLevel(level)
except ValueError:
self._log.error('Logging level %s invalid' % level)

if __name__ == "__main__":

Expand Down

0 comments on commit aad4ccf

Please sign in to comment.