summaryrefslogtreecommitdiff
path: root/qpid/python/mllib/__init__.py
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
commitc5743e2761aa666bce95d5a1bd7611a96c645832 (patch)
tree34b29d196b5b3eff00dc54b82ab34dfdb256d371 /qpid/python/mllib/__init__.py
parentcb6fdfc91be56bcd2ce53ff4429c4bc8618e94bf (diff)
downloadqpid-python-c5743e2761aa666bce95d5a1bd7611a96c645832.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@1622950 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/python/mllib/__init__.py')
-rw-r--r--qpid/python/mllib/__init__.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/qpid/python/mllib/__init__.py b/qpid/python/mllib/__init__.py
index 9aa1e56e66..af192df1d1 100644
--- a/qpid/python/mllib/__init__.py
+++ b/qpid/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()