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

ENH: wrap application::IsDeprecated and display a warning message when...

ENH: wrap application::IsDeprecated and display a warning message when creating a deprecated application in python
No related merge requests found
Showing with 3 additions and 0 deletions
+3 -0
...@@ -225,6 +225,7 @@ public: ...@@ -225,6 +225,7 @@ public:
unsigned long itk::Object::AddObserver(const EventObject & event, unsigned long itk::Object::AddObserver(const EventObject & event,
Command * command); Command * command);
bool IsDeprecated();
#if SWIGPYTHON #if SWIGPYTHON
%extend %extend
...@@ -906,6 +907,8 @@ public: ...@@ -906,6 +907,8 @@ public:
application = _otbApplication.Registry_CreateApplicationWithoutLogger(name) application = _otbApplication.Registry_CreateApplicationWithoutLogger(name)
if application is not None: if application is not None:
application.SetupLogger() application.SetupLogger()
if application.IsDeprecated():
application.GetLogger().Warning("This application is deprecated and will be removed in a future OTB release")
return application return application
} }
#else #else
......
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