From d7468bd6f39f2715ff44df3b4c07c12a0845cdf7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?C=C3=A9dric=20Traizet?= <cedric.traizet@c-s.fr>
Date: Tue, 7 May 2019 16:58:09 +0200
Subject: [PATCH] ENH: Deprecated cannot be an application section anymore

---
 .../Cookbook/Scripts/otbGenerateWrappersRstDoc.py      | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/Documentation/Cookbook/Scripts/otbGenerateWrappersRstDoc.py b/Documentation/Cookbook/Scripts/otbGenerateWrappersRstDoc.py
index 1bbf08ca2f..77d197f07a 100755
--- a/Documentation/Cookbook/Scripts/otbGenerateWrappersRstDoc.py
+++ b/Documentation/Cookbook/Scripts/otbGenerateWrappersRstDoc.py
@@ -413,13 +413,13 @@ def GenerateRstForApplications(rst_dir):
     for appName in appNames:
 
         # Get application first tag
-        tags = GetApplicationTags(appName)
+        tags = list(GetApplicationTags(appName))
+        if "Deprecated" in tags:
+            tags.remove("Deprecated")
         if not tags or len(tags) == 0:
             raise RuntimeError("No tags for application: " + appName)
-        if "Deprecated" in tags:
-            tag = "Deprecated"
-        else:
-            tag = tags[0]
+
+        tag = tags[0]
         tag_ = tag.replace(" ", "_")
 
         # Add it to the index (i.e. https://www.orfeo-toolbox.org/CookBook/Applications.html)
-- 
GitLab