The upgrade status manifest may not be available during system upgrade.

This commit is contained in:
Jeffrey Townsend
2016-11-09 21:18:47 +00:00
parent 48689e3d98
commit 04658945c5

View File

@@ -176,8 +176,9 @@ class BaseUpgrade(object):
def update_upgrade_status(self, key, value):
data = self.upgrade_status_get()
data[key] = value
with open(self.UPGRADE_STATUS_JSON, "w") as f:
json.dump(data, f)
if os.path.exists(os.path.dirname(BaseUpgrade.UPGRADE_STATUS_JSON)):
with open(self.UPGRADE_STATUS_JSON, "w") as f:
json.dump(data, f)
#
# Initialize self.current_version, self.next_Version