summaryrefslogtreecommitdiffstats
path: root/pym/portage/elog
diff options
context:
space:
mode:
authorMarius Mauch <genone@gentoo.org>2008-03-02 13:44:03 +0000
committerMarius Mauch <genone@gentoo.org>2008-03-02 13:44:03 +0000
commit14f0cfea20444383e9b0d0bbb9118c093f7f4bb8 (patch)
tree622e4d049a3cbfcff3a7330dc72e7c34fdbc72d6 /pym/portage/elog
parentc956a435365bc19f746eb75650b21a5613683783 (diff)
downloadportage-14f0cfea20444383e9b0d0bbb9118c093f7f4bb8.tar.gz
portage-14f0cfea20444383e9b0d0bbb9118c093f7f4bb8.tar.bz2
portage-14f0cfea20444383e9b0d0bbb9118c093f7f4bb8.zip
ensure that global variables are used to prevent confusing issues like bug #212055
svn path=/main/trunk/; revision=9407
Diffstat (limited to 'pym/portage/elog')
-rw-r--r--pym/portage/elog/__init__.py2
-rw-r--r--pym/portage/elog/messages.py7
2 files changed, 8 insertions, 1 deletions
diff --git a/pym/portage/elog/__init__.py b/pym/portage/elog/__init__.py
index 5aa6930c7..3039370a3 100644
--- a/pym/portage/elog/__init__.py
+++ b/pym/portage/elog/__init__.py
@@ -56,7 +56,7 @@ def _load_mod(name):
_elog_atexit_handlers = []
_preserve_logentries = {}
def elog_process(cpv, mysettings, phasefilter=None):
-
+ global _elog_atexit_handlers, _preserve_logentries
logsystems = mysettings.get("PORTAGE_ELOG_SYSTEM","").split()
for s in logsystems:
diff --git a/pym/portage/elog/messages.py b/pym/portage/elog/messages.py
index 888341af5..852b71af9 100644
--- a/pym/portage/elog/messages.py
+++ b/pym/portage/elog/messages.py
@@ -47,6 +47,9 @@ def _elog_base(level, msg, phase="other", key=None, color=None):
""" Backend for the other messaging functions, should not be called
directly.
"""
+
+ global _msgbuffer
+
if color == None:
color = "GOOD"
print colorize(color, " * ")+msg
@@ -59,6 +62,8 @@ def _elog_base(level, msg, phase="other", key=None, color=None):
#raise NotImplementedError()
def collect_messages():
+ global _msgbuffer
+
rValue = _msgbuffer
_reset_buffer()
return rValue
@@ -67,6 +72,8 @@ def _reset_buffer():
""" Reset the internal message buffer when it has been processed,
should not be called directly.
"""
+ global _msgbuffer
+
_msgbuffer = {}
# creating and exporting the actual messaging functions