Sync log.py from oslo-incubator

This pulls in the latest version of log.py from oslo-incubator
which elminates the constant user_identity key error.

Note that this sync does a full sync, in other words it uses
the oslo update script and pulls in the log.py file and all
of the associated dependendencies for that module.

Current HEAD in OSLO:
--------------------
Merge: d9ea4f0 fd33d1e
Date:   Wed Mar 12 17:00:13 2014 +0000
Merge "Fix gettextutil.Message handling of deep copy failures"
--------------------

Change-Id: I7c9f8acd22787f9649a5a1e796238c7788a0484a
Fixes-Bug: 1290503
This commit is contained in:
john-griffith
2014-03-12 10:59:45 -06:00
parent a5c5e6871d
commit 1553a1e78e
6 changed files with 94 additions and 41 deletions

View File

@@ -58,6 +58,13 @@ def import_module(import_str):
return sys.modules[import_str]
def import_versioned_module(version, submodule=None):
module = 'cinder.v%s' % version
if submodule:
module = '.'.join((module, submodule))
return import_module(module)
def try_import(import_str, default=None):
"""Try to import a module and if it fails return default."""
try: