Skip to content

Commit

Permalink
[processing] catch error when local help files fail when trying to fi…
Browse files Browse the repository at this point in the history
…nd version number of script
  • Loading branch information
volaya committed Jun 8, 2014
1 parent 5b91232 commit 414d371
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions python/plugins/processing/gui/GetScriptsAndModels.py
Expand Up @@ -164,18 +164,13 @@ def getTreeBranchForState(self, filename, version):
return self.notinstalledItem
else:
helpFile = os.path.join(self.folder, filename + ".help")
if not os.path.exists(helpFile):
currentVersion = 1
else:
with open(helpFile) as f:
try:
with open(helpFile) as f:
helpContent = json.load(f)
try:
currentVersion = float(helpContent[Help2Html.ALG_VERSION])
except:
currentVersion = 1
print filename, currentVersion, version
if version > currentVersion:
print version - currentVersion
currentVersion = float(helpContent[Help2Html.ALG_VERSION])
except:
currentVersion = 1
if version > currentVersion:
return self.toupdateItem
else:
return self.uptodateItem
Expand Down

0 comments on commit 414d371

Please sign in to comment.