Skip to content
Permalink
Browse files
[processing] catch error when local help files fail when trying to fi…
…nd version number of script
  • Loading branch information
volaya committed Jun 8, 2014
1 parent 5b91232 commit 414d371376309a260a945a4e563debf5fe47fe58
Showing with 6 additions and 11 deletions.
  1. +6 −11 python/plugins/processing/gui/GetScriptsAndModels.py
@@ -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

0 comments on commit 414d371

Please sign in to comment.