handle non existent env

This commit is contained in:
shim_ 2018-09-09 23:46:08 +02:00
parent 2710feb490
commit e96bd34bf5

View File

@ -82,7 +82,7 @@ def install_command(url):
if len(current) == 1: current = current[0]
else: current = "0.0.0"
print("Upgrading from: %s -> %s" % (current, target_version))
perform_upgrade_command(target_version,mysql=(os.environ["SEAF_MYSQL"] or False))
perform_upgrade_command(target_version,mysql=("SEAF_MYSQL" in os.environ and os.environ["SEAF_MYSQL"]))
if len(os.listdir(tmp)) != 0:
print("Failed to unpack update")
os.rmdir(tmp)