From 59e3bee9b0af8dd6dde38d80c5d21fe5207eec6f Mon Sep 17 00:00:00 2001 From: Nayil Mukhametshin <66028747+nlscc@users.noreply.github.com> Date: Sat, 25 Jul 2020 22:15:01 +0100 Subject: fix #3 (broken checkupdate command) --- samloader/versionfetch.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/samloader/versionfetch.py b/samloader/versionfetch.py index d5927d7..a9d2437 100644 --- a/samloader/versionfetch.py +++ b/samloader/versionfetch.py @@ -11,7 +11,8 @@ def getlatestver(region, model): root = ET.fromstring(r.text) vercode = root.find("./firmware/version/latest").text vc = vercode.split("/") - if len(vc) == 4: - return vercode - else: - return vercode + "/" + vc[0] + if len(vc) == 3: + vc.append(vc[0]) + if vc[2] == "": + vc[2] = vc[0] + return "/".join(vc) -- cgit v1.2.3