You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ai...@apache.org on 2008/05/14 16:47:31 UTC

svn commit: r656301 - /incubator/qpid/trunk/qpid/python/mllib/__init__.py

Author: aidan
Date: Wed May 14 07:47:31 2008
New Revision: 656301

URL: http://svn.apache.org/viewvc?rev=656301&view=rev
Log:
Merge branch 'python-mllib'

Modified:
    incubator/qpid/trunk/qpid/python/mllib/__init__.py

Modified: incubator/qpid/trunk/qpid/python/mllib/__init__.py
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/python/mllib/__init__.py?rev=656301&r1=656300&r2=656301&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/python/mllib/__init__.py (original)
+++ incubator/qpid/trunk/qpid/python/mllib/__init__.py Wed May 14 07:47:31 2008
@@ -22,7 +22,7 @@
 both SGML and XML.
 """
 
-import os, dom, transforms, parsers
+import os, dom, transforms, parsers, sys
 import xml.sax, types
 from cStringIO import StringIO
 
@@ -50,8 +50,11 @@
   return p.parser.tree
 
 def xml_parse(filename):
-  # XXX: this is for older versions of python
-  source = "file://%s" % os.path.abspath(filename) 
+  if sys.version_info[0:2] == (2,3):
+    # XXX: this is for older versions of python
+    source = "file://%s" % os.path.abspath(filename) 
+  else:
+    source = filename
   p = parsers.XMLParser()
   xml.sax.parse(source, p)
   return p.parser.tree