Merge branch 'checkupdates-crash' into 'master'

checkupdates: avoid crash with --auto and None CVC

As reported by @CiaranG.

See merge request !173
This commit is contained in:
Ciaran Gultnieks 2016-09-26 21:46:16 +00:00
commit d3a215c12b

View file

@ -452,7 +452,9 @@ def checkupdates_app(app, first=True):
if options.auto: if options.auto:
mode = app.AutoUpdateMode mode = app.AutoUpdateMode
if mode in ('None', 'Static'): if not app.CurrentVersionCode:
logging.warn("Can't auto-update app with no current version code: " + app.id)
elif mode in ('None', 'Static'):
pass pass
elif mode.startswith('Version '): elif mode.startswith('Version '):
pattern = mode[8:] pattern = mode[8:]