From e96bd34bf51b7dae5b7cf66882ff644d81201bc9 Mon Sep 17 00:00:00 2001 From: shim_ <> Date: Sun, 9 Sep 2018 23:46:08 +0200 Subject: [PATCH] handle non existent env --- scripts/upgrade.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upgrade.py b/scripts/upgrade.py index 46e727f..1345048 100755 --- a/scripts/upgrade.py +++ b/scripts/upgrade.py @@ -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)