summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--samloader/versionfetch.py9
1 files 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)