Commit b43ef7a7 authored by Cédric Traizet's avatar Cédric Traizet
Browse files

ENH: code review

No related merge requests found
Showing with 6 additions and 4 deletions
+6 -4
...@@ -358,13 +358,14 @@ def make_links(text, allapps): ...@@ -358,13 +358,14 @@ def make_links(text, allapps):
def render_deprecation_string(app): def render_deprecation_string(app):
if app.IsDeprecated(): if app.IsDeprecated():
return ("This application is deprecated and will be removed in a future release.") return "This application is deprecated and will be removed in a future release."
else: else:
return("") return ""
def render_application(appname, allapps): def render_application(appname, allapps):
"Render app to rst" "Render app to rst"
# Create the application without logger to avoid the deprecation warning log
app = otbApplication.Registry.CreateApplicationWithoutLogger(appname) app = otbApplication.Registry.CreateApplicationWithoutLogger(appname)
# TODO: remove this when bug 440 is fixed # TODO: remove this when bug 440 is fixed
...@@ -388,8 +389,9 @@ def render_application(appname, allapps): ...@@ -388,8 +389,9 @@ def render_application(appname, allapps):
return output return output
def GetApplicationTags(appname): def GetApplicationTags(appname):
app = otbApplication.Registry.CreateApplicationWithoutLogger(appname) # Create the application without logger to avoid the deprecation warning log
return app.GetDocTags() app = otbApplication.Registry.CreateApplicationWithoutLogger(appname)
return app.GetDocTags()
def GenerateRstForApplications(rst_dir): def GenerateRstForApplications(rst_dir):
"Generate .rst files for all applications" "Generate .rst files for all applications"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment