From 74cb53eb293c76bd8855cc3d38c93297c7c923d6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?C=C3=A9dric=20Traizet?= <cedric.traizet@c-s.fr>
Date: Mon, 5 Aug 2019 10:37:29 +0200
Subject: [PATCH] BUG: in set_attr, check if the key if progressReportManager
 before checking if it is a parameter

---
 Modules/Wrappers/SWIG/src/otbApplication.i | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/Modules/Wrappers/SWIG/src/otbApplication.i b/Modules/Wrappers/SWIG/src/otbApplication.i
index e8837af9e9..943339c2ea 100644
--- a/Modules/Wrappers/SWIG/src/otbApplication.i
+++ b/Modules/Wrappers/SWIG/src/otbApplication.i
@@ -739,14 +739,15 @@ class ApplicationProxy(object):
 				if type(value).__name__ == 'SwigPyObject':
 					self.__dict__[name] = value
 					return
+			if (name == "progressReportManager"):
+				super().__setattr__(name, value)
+				return
 			method = Application.__swig_setmethods__.get(name, None)
 			if method:
 				return method(self, value)
 			key_list = [k.upper() for k in self.GetParametersKeys(True)]
 			if name in key_list:
 				self.SetParameterValue(name.lower(), value)
-			if (name == "progressReportManager"):
-				super().__setattr__(name, value)
 			else:
 				raise AttributeError("You cannot add attributes to %s" % self)
 
-- 
GitLab