Blame SOURCES/pykde4-4.10.5-crash_module.patch

80f82b
diff -up pykde4-4.10.5/__init__.py.me pykde4-4.10.5/__init__.py
80f82b
--- pykde4-4.10.5/__init__.py.me	2018-12-04 13:31:43.545667006 +0100
80f82b
+++ pykde4-4.10.5/__init__.py	2018-12-04 13:31:51.116708365 +0100
80f82b
@@ -1,4 +1,13 @@
80f82b
 import sys,DLFCN
80f82b
-# This is needed to ensure that dynamic_cast and RTTI works inside kdelibs.
80f82b
-sys.setdlopenflags(DLFCN.RTLD_NOW|DLFCN.RTLD_GLOBAL)
80f82b
-     
80f82b
\ Kein Zeilenumbruch am Dateiende.
80f82b
+
80f82b
+def main():
80f82b
+    dlopenflag = sys.getdlopenflags()
80f82b
+    try:
80f82b
+        # This is needed to ensure that dynamic_cast and RTTI works inside kdelibs.
80f82b
+        sys.setdlopenflags(DLFCN.RTLD_NOW|DLFCN.RTLD_GLOBAL)
80f82b
+    finally:
80f82b
+        # set to default dlopenflag to avoid problem in other modules
80f82b
+        sys.setdlopenflags(dlopenflag)
80f82b
+
80f82b
+if __name__=='__main__':
80f82b
+    main()