add exception handling for what_version_is_this, fixes #659

This commit is contained in:
Joshua Tauberer 2016-01-09 09:22:34 -05:00
parent 5045e206c2
commit 2ad7d0830e
2 changed files with 7 additions and 1 deletions

View file

@ -12,6 +12,7 @@ Control Panel:
* The SSL (now "TLS") certificates page now supports provisioning free SSL certificates from Let's Encrypt. * The SSL (now "TLS") certificates page now supports provisioning free SSL certificates from Let's Encrypt.
* Report free memory usage. * Report free memory usage.
* Fix a crash when the git directory is not checked out to a tag.
System: System:

View file

@ -751,8 +751,13 @@ def check_miab_version(env, output):
if config.get("privacy", True): if config.get("privacy", True):
output.print_warning("Mail-in-a-Box version check disabled by privacy setting.") output.print_warning("Mail-in-a-Box version check disabled by privacy setting.")
else: else:
this_ver = what_version_is_this(env) try:
this_ver = what_version_is_this(env)
except:
this_ver = "Unknown"
latest_ver = get_latest_miab_version() latest_ver = get_latest_miab_version()
if this_ver == latest_ver: if this_ver == latest_ver:
output.print_ok("Mail-in-a-Box is up to date. You are running version %s." % this_ver) output.print_ok("Mail-in-a-Box is up to date. You are running version %s." % this_ver)
else: else: