call init.py/shutdown on application close
Stefan Bund [Sun, 16 Jan 2011 20:47:12 +0000 (21:47 +0100)]
PythonPublisher.cc

index 410f707..c6ad1fc 100644 (file)
@@ -459,7 +459,12 @@ prefix_ pykit::PythonPublisher::PythonPublisher()
 }
 
 prefix_ pykit::PythonPublisher::~PythonPublisher()
-{}
+{
+    try {
+        impl_->mainNamespace["shutdown"]();
+    }
+    catch (...) {;}
+}
 
 prefix_ void pykit::PythonPublisher::publish(Request & request)
 {