summaryrefslogtreecommitdiff
path: root/qpid/python/mllib
diff options
context:
space:
mode:
authorRafael H. Schloming <rhs@apache.org>2008-05-13 19:16:15 +0000
committerRafael H. Schloming <rhs@apache.org>2008-05-13 19:16:15 +0000
commite0992fcd5dfceb2504fc8f3f6b9fce28035f37d4 (patch)
tree1e2005b8daa843424a1e65674b07ee9a95cd7551 /qpid/python/mllib
parent433c13dd51170b93845fba0863fbd34b16941f5a (diff)
downloadqpid-python-e0992fcd5dfceb2504fc8f3f6b9fce28035f37d4.tar.gz
QPID-954: added fallbacks and fixes for running the python client on python 2.3
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@655976 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/python/mllib')
-rw-r--r--qpid/python/mllib/__init__.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/qpid/python/mllib/__init__.py b/qpid/python/mllib/__init__.py
index 44b78126fb..81165f6999 100644
--- a/qpid/python/mllib/__init__.py
+++ b/qpid/python/mllib/__init__.py
@@ -22,7 +22,7 @@ This module provides document parsing and transformation utilities for
both SGML and XML.
"""
-import dom, transforms, parsers
+import os, dom, transforms, parsers
import xml.sax, types
from cStringIO import StringIO
@@ -49,7 +49,9 @@ def sgml_parse(source):
p.close()
return p.parser.tree
-def xml_parse(source):
+def xml_parse(filename):
+ # XXX: this is for older versions of python
+ source = "file://%s" % os.path.abspath(filename)
p = parsers.XMLParser()
xml.sax.parse(source, p)
return p.parser.tree