From 561f3cd3d7cd8f78d873e1bbfc9d9b144347c685 Mon Sep 17 00:00:00 2001 From: William S Fulton Date: Sun, 12 Nov 2006 01:21:22 +0000 Subject: [PATCH] Path #1578346 - Python exceptions fail git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9544 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- SWIG/Source/Modules/python.cxx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/SWIG/Source/Modules/python.cxx b/SWIG/Source/Modules/python.cxx index 37a183322..93159f0a4 100644 --- a/SWIG/Source/Modules/python.cxx +++ b/SWIG/Source/Modules/python.cxx @@ -2610,7 +2610,6 @@ public: if (str != NULL && Len(str)) Printv(f_shadow, tab4, str, "\n", NIL); } - if (!modern) { Printv(f_shadow, tab4, "__swig_setmethods__ = {}\n", NIL); if (Len(base_class)) { Printf(f_shadow, "%sfor _s in [%s]: __swig_setmethods__.update(_s.__swig_setmethods__)\n", tab4, base_class); @@ -2628,7 +2627,7 @@ public: } Printv(f_shadow, tab4, "__getattr__ = lambda self, name: _swig_getattr(self, ", class_name, ", name)\n", NIL); - } else { + if (modern) { Printv(f_shadow, tab4, "thisown = _swig_property(lambda x: x.this.own(), ", "lambda x, v: x.this.own(v), doc='The membership flag')\n", NIL); /* Add static attribute */ if (GetFlag(n, "feature:python:nondynamic")) {