chiark / gitweb /
checkupdates --gplay: handle the case when Current Version is empty
authorJean Privat <jean@pryen.org>
Wed, 15 Jan 2014 15:21:48 +0000 (10:21 -0500)
committerJean Privat <jean@pryen.org>
Wed, 15 Jan 2014 16:33:35 +0000 (11:33 -0500)
Signed-off-by: Jean Privat <jean@pryen.org>
fdroidserver/checkupdates.py

index 94dbd2980119675e3b4ced8f1db7c4d9ac9857f9..8adaf2973ebcb4705198ab82aa0d31af3e71edaf 100644 (file)
@@ -314,7 +314,11 @@ def main():
                     print "%s encountered a problem: %s" % (common.getappname(app), reason)
             if version is not None:
                 stored = app['Current Version']
-                if LooseVersion(stored) < LooseVersion(version):
+                if stored == '':
+                    if options.verbose:
+                        print "%s has no Current Version but has version %s on the Play Store" % (
+                                common.getappname(app), version)
+                elif LooseVersion(stored) < LooseVersion(version):
                     print "%s has version %s on the Play Store, which is bigger than %s" % (
                             common.getappname(app), version, stored)
                 elif options.verbose: