[node-patches] Change in ovirt-node[master]: log: Workaround missing getChild in python 2.6

fabiand at fedoraproject.org fabiand at fedoraproject.org
Mon Sep 30 07:38:30 UTC 2013


Fabian Deutsch has uploaded a new change for review.

Change subject: log: Workaround missing getChild in python 2.6
......................................................................

log: Workaround missing getChild in python 2.6

Logger.getChild() is missing in python 2.6, so we need to work around
this.
Done by emulating getChild.

Change-Id: Ie22fb60025a8de54d9044281fe964c081bb6ebaf
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1013461
Signed-off-by: Fabian Deutsch <fabiand at fedoraproject.org>
---
M src/ovirt/node/log.py
1 file changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/66/19666/1

diff --git a/src/ovirt/node/log.py b/src/ovirt/node/log.py
index 855c9c8..4535719 100644
--- a/src/ovirt/node/log.py
+++ b/src/ovirt/node/log.py
@@ -75,5 +75,6 @@
     if not getLogger._logger:
         configure_logging()
         getLogger._logger = logging.getLogger()
-    return getLogger._logger.getChild(name)
+    fullname = ".".join([getLogger._logger.name, name]) if name else name
+    return logging.getLogger(fullname)
 getLogger._logger = None


-- 
To view, visit http://gerrit.ovirt.org/19666
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie22fb60025a8de54d9044281fe964c081bb6ebaf
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Fabian Deutsch <fabiand at fedoraproject.org>



More information about the node-patches mailing list