From e0992fcd5dfceb2504fc8f3f6b9fce28035f37d4 Mon Sep 17 00:00:00 2001 From: "Rafael H. Schloming" Date: Tue, 13 May 2008 19:16:15 +0000 Subject: 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 --- qpid/python/mllib/__init__.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'qpid/python/mllib') 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 -- cgit v1.2.1