From a514ff9f367ecc35847ad8a1b2813f02507855d7 Mon Sep 17 00:00:00 2001 From: Faik Uygur Date: Tue, 1 Apr 2008 13:29:45 +0000 Subject: [PATCH] Argh! read_xml gets some times str sometimes URI parameter --- pisi/pxml/xmlfile.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pisi/pxml/xmlfile.py b/pisi/pxml/xmlfile.py index 490fd980..5afdfe08 100644 --- a/pisi/pxml/xmlfile.py +++ b/pisi/pxml/xmlfile.py @@ -65,10 +65,11 @@ class XmlFile(object): def readxml(self, uri, tmpDir='/tmp', sha1sum=False, compress=None, sign=None, copylocal = False): + uri = pisi.file.File.make_uri(uri) + # workaround for repo index files to fix # rev. 17027 regression (http://liste.pardus.org.tr/gelistirici/2008-February/011133.html) - compressed = uri.endswith(".bz2") or uri.endswith(".gz") - uri = pisi.file.File.make_uri(uri) + compressed = str(uri).endswith(".bz2") or str(uri).endswith(".gz") if uri.is_local_file() and not compressed: # this is a local file