Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Handle logging dictConfig on el6.

  • Loading branch information...
commit 48503340da04afffa2abe6e25ab160c081bbd5f8 1 parent 9b63b99
Ralph Bean ralphbean authored
Showing with 8 additions and 2 deletions.
  1. +8 −2 summershum/cli.py
10 summershum/cli.py
View
@@ -7,7 +7,13 @@
import summershum.model
import logging
-import logging.config
+try:
+ # Python2.7 and later
+ from logging.config import dictConfig
+except ImportError:
+ # For Python2.6, we rely on a third party module.
+ from logutils.dictconfig import dictConfig
+
log = logging.getLogger("summershum")
@@ -46,7 +52,7 @@ def main():
'active': True,
})
- logging.config.dictConfig(config.get('logging', {'version': 1}))
+ dictConfig(config.get('logging', {'version': 1}))
log.info("Starting summershum ingestion")
fedmsg.init(**config)
Please sign in to comment.
Something went wrong with that request. Please try again.