~lnj/qli-installer

e98b5d5c27702e59bd0bfc863fca7058cbc0f0b3 — Linus Jahn 5 years ago b9ef62e
Make compatible with Qt 5.9

Unfortunately all older versions still have problems with XML parsing. 
On the other hand: we don't need the old versions.
1 files changed, 10 insertions(+), 8 deletions(-)

M qli-installer.py
M qli-installer.py => qli-installer.py +10 -8
@@ 80,21 80,23 @@ update_xml = ElementTree.fromstring(reply.content)
package_desc = ""
full_version = ""
archives = []
archives_url = ""
for packageupdate in update_xml.findall("PackageUpdate"):
    name = packageupdate.find("Name").text
    if name != "qt.qt5.{}.{}".format(qt_ver_num, arch):
        continue

    full_version = packageupdate.find("Version").text
    archives = packageupdate.find("DownloadableArchives").text.split(", ")
    package_desc = packageupdate.find("Description").text
    break
    if name == "qt.qt5.{}.{}".format(qt_ver_num, arch) or name == "qt.{}.{}".format(qt_ver_num, arch):
        full_version = packageupdate.find("Version").text
        archives = packageupdate.find("DownloadableArchives").text.split(", ")
        package_desc = packageupdate.find("Description").text
        if ".qt5." in name:
            archives_url = packages_url + "qt.qt5.{}.{}/".format(qt_ver_num, arch)
        else:
            archives_url = packages_url + "qt.{}.{}/".format(qt_ver_num, arch)
        break

if not full_version or not archives:
    print("Error while parsing package information!")
    exit(1)

archives_url = packages_url + "qt.qt5.{}.{}/".format(qt_ver_num, arch)

print("****************************************")
print("Installing {}".format(package_desc))