Skip to content
Permalink
Browse files

Merge branch 'processing_shortHelp'

  • Loading branch information
rldhont committed May 28, 2016
2 parents 3d95712 + 8592a7e commit 27c5f78f4d27e5ca4bce52eb118eae184b82282d
@@ -434,15 +434,34 @@ def help(self):
else:
return False, None

def shortHelp(self):
if self.descriptionFile is None:
return None
helpFile = unicode(self.descriptionFile) + '.help'
if os.path.exists(helpFile):
with open(helpFile) as f:
try:
descriptions = json.load(f)
if 'ALG_DESC' in descriptions:
return self._formatHelp(unicode(descriptions['ALG_DESC']))
except:
return None
return None

def getParameterDescriptions(self):
descs = {}
helpfile = unicode(self.descriptionFile) + '.help'
if os.path.exists(helpfile):
if self.descriptionFile is None:
return descs
helpFile = unicode(self.descriptionFile) + '.help'
if os.path.exists(helpFile):
with open(helpFile) as f:
descriptions = json.load(f)
for param in self.parameters:
if param.name in descriptions:
descs[param.name] = unicode(descriptions[param.name])
try:
descriptions = json.load(f)
for param in self.parameters:
if param.name in descriptions:
descs[param.name] = unicode(descriptions[param.name])
except:
return None
return descs

def checkBeforeOpeningParametersDialog(self):
@@ -544,6 +544,11 @@ def help(self):
except:
return False, None

def shortHelp(self):
if 'ALG_DESC' in self.helpContent:
return self._formatHelp(unicode(self.helpContent['ALG_DESC']))
return None

def getParameterDescriptions(self):
descs = {}
descriptions = self.helpContent
@@ -351,13 +351,32 @@ def help(self):
else:
return False, None

def shortHelp(self):
if self.descriptionFile is None:
return None
helpFile = unicode(self.descriptionFile) + '.help'
if os.path.exists(helpFile):
with open(helpFile) as f:
try:
descriptions = json.load(f)
if 'ALG_DESC' in descriptions:
return self._formatHelp(unicode(descriptions['ALG_DESC']))
except:
return None
return None

def getParameterDescriptions(self):
descs = {}
helpfile = unicode(self.descriptionFile) + '.help'
if os.path.exists(helpfile):
if self.descriptionFile is None:
return descs
helpFile = unicode(self.descriptionFile) + '.help'
if os.path.exists(helpFile):
with open(helpFile) as f:
descriptions = json.load(f)
for param in self.parameters:
if param.name in descriptions:
descs[param.name] = unicode(descriptions[param.name])
try:
descriptions = json.load(f)
for param in self.parameters:
if param.name in descriptions:
descs[param.name] = unicode(descriptions[param.name])
except:
return None
return descs

0 comments on commit 27c5f78

Please sign in to comment.
You can’t perform that action at this time.