diff --git a/daemon/core/misc/xmlparser.py b/daemon/core/misc/xmlparser.py index daaaa68a..fb07fb48 100644 --- a/daemon/core/misc/xmlparser.py +++ b/daemon/core/misc/xmlparser.py @@ -4,13 +4,13 @@ from xml.dom.minidom import parse from xmlutils import getoneelement -from xmlparser1 import CoreDocumentParser1 +from xmlparser0 import CoreDocumentParser0 class CoreVersionParser(object): '''\ Helper class to check the version of Network Plan document. This simply looks for a "Scenario" element; when present, this - indicates a 1.0 version document. The dom member is set in order + indicates a 0.0 version document. The dom member is set in order to prevent parsing a file twice (it can be passed to the appropriate CoreDocumentParser class.) ''' @@ -21,7 +21,7 @@ class CoreVersionParser(object): self.dom = parse(filename) self.scenario = getoneelement(self.dom, 'Scenario') if self.scenario is not None: - self.version = 1.0 + self.version = 0.0 else: self.version = 'unknown' @@ -29,8 +29,8 @@ def core_document_parser(session, filename, options): vp = CoreVersionParser(filename, options) if 'dom' not in options: options['dom'] = vp.dom - if vp.version == 1.0: - doc = CoreDocumentParser1(session, filename, options) + if vp.version == 0.0: + doc = CoreDocumentParser0(session, filename, options) else: raise ValueError, 'unsupported document version: %s' % vp.version return doc diff --git a/daemon/core/misc/xmlparser1.py b/daemon/core/misc/xmlparser0.py similarity index 99% rename from daemon/core/misc/xmlparser1.py rename to daemon/core/misc/xmlparser0.py index f1fff574..c945326d 100644 --- a/daemon/core/misc/xmlparser1.py +++ b/daemon/core/misc/xmlparser0.py @@ -10,7 +10,7 @@ from core.netns import nodes from xml.dom.minidom import parse from xmlutils import * -class CoreDocumentParser1(object): +class CoreDocumentParser0(object): def __init__(self, session, filename, options): self.session = session self.verbose = self.session.getcfgitembool('verbose', False)