summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorKeith Wall <kwall@apache.org>2014-09-06 22:06:05 +0000
committerKeith Wall <kwall@apache.org>2014-09-06 22:06:05 +0000
commit11aa1cb4e904267982136396ec0d835ddbedf572 (patch)
tree1d45137a66cdfc32ea27436b4dea57d94c44c64d /python
parent9ca387a6c4d22a6a476a494ee02f0e2d8a341589 (diff)
downloadqpid-python-11aa1cb4e904267982136396ec0d835ddbedf572.tar.gz
QPID-6083: [Python Client] utilise pathname2url when constructing spec file location on older python versions
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1622950 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'python')
-rw-r--r--python/mllib/__init__.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/python/mllib/__init__.py b/python/mllib/__init__.py
index 9aa1e56e66..af192df1d1 100644
--- a/python/mllib/__init__.py
+++ b/python/mllib/__init__.py
@@ -68,7 +68,8 @@ class Resolver:
def xml_parse(filename, path=()):
if sys.version_info[0:2] == (2,3):
# XXX: this is for older versions of python
- source = "file://%s" % os.path.abspath(filename)
+ from urllib import pathname2url
+ source = "file:%s" % pathname2url( os.path.abspath( filename ) )
else:
source = filename
h = parsers.XMLParser()