Skip to content

Commit

Permalink
Read isRelease from version file too
Browse files Browse the repository at this point in the history
  • Loading branch information
joepal1976 committed Feb 28, 2018
1 parent bd6517d commit 298b5a5
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion makehuman/lib/mhversion.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def _checkForVersionFile(self):
if os.path.exists(path):
jsonin = None
with open(path,'r') as f:
jsonin = json.get(f)
jsonin = json.load(f)

if not jsonin is None:
if "currentShortCommit" in jsonin:
Expand All @@ -112,6 +112,9 @@ def _checkForVersionFile(self):
if "version" in jsonin:
self.version = jsonin["version"]

if "isRelease" in jsonin:
self.isRelease = jsonin["isRelease"]

def writeVersionFile(self, overrideVersionPath=None):
path = overrideVersionPath
if path is None:
Expand All @@ -136,6 +139,9 @@ def writeVersionFile(self, overrideVersionPath=None):
if not self.version is None:
out["version"] = self.version

if not self.isRelease is None:
out["isRelease"] = self.isRelease

with open(path,'w') as f:
json.dump(out,f, sort_keys=True, indent=4)

0 comments on commit 298b5a5

Please sign in to comment.