summaryrefslogtreecommitdiffstats
path: root/rteval/xmlout.py
diff options
context:
space:
mode:
authorClark Williams <williams@redhat.com>2009-03-18 10:57:26 -0500
committerClark Williams <williams@redhat.com>2009-03-18 10:57:26 -0500
commitaf9a766cde12f9dc07b4415c47dfea00d5e1e9b6 (patch)
tree04ccc46ef9b943aaaa013c0e1da6e888ac4d1320 /rteval/xmlout.py
parent1eee5e31674654d1b433364b92a04912b5f32515 (diff)
downloadrteval-af9a766cde12f9dc07b4415c47dfea00d5e1e9b6.tar.gz
rteval-af9a766cde12f9dc07b4415c47dfea00d5e1e9b6.tar.xz
rteval-af9a766cde12f9dc07b4415c47dfea00d5e1e9b6.zip
fixed race condition in xmlout constructor/destructor with initialization of level member
Diffstat (limited to 'rteval/xmlout.py')
-rw-r--r--rteval/xmlout.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/rteval/xmlout.py b/rteval/xmlout.py
index f2d6a2c..2b91f15 100644
--- a/rteval/xmlout.py
+++ b/rteval/xmlout.py
@@ -11,13 +11,14 @@ from string import maketrans
class XMLOut(object):
'''Class to create XML output'''
def __init__(self, roottag, version, attr = None, encoding='UTF-8'):
+ self.level = 0
self.encoding = encoding
self.rootattr = attr
self.version = version
self.status = 0 # 0 - no report created/loaded, 1 - new report, 2 - loaded report, 3 - XML closed
self.tag_trans = self.__setup_tag_trans()
self.roottag = self.__fixtag(roottag)
-
+
def __del__(self):
if self.level > 0:
raise RuntimeError, "XMLOut: open blocks at close"