changeset 8176:d2904a0c5d41

py3: use .__func__ instead of .im_func Based on 2to3 -f methodattrs ... but manually dropping a __func__ because py3 unbound methods *are* the func itself.
author Mads Kiilerich <mads@kiilerich.com>
date Sat, 23 Nov 2019 21:28:37 +0100
parents d1f091d4b765
children e26c0616e003
files kallithea/lib/auth_modules/__init__.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/kallithea/lib/auth_modules/__init__.py	Sat Nov 23 21:33:49 2019 +0100
+++ b/kallithea/lib/auth_modules/__init__.py	Sat Nov 23 21:28:37 2019 +0100
@@ -309,7 +309,7 @@
                         "a subclass of %s" % (plugin, KallitheaAuthPluginBase))
 
     plugin = pluginclass()
-    if plugin.plugin_settings.im_func != KallitheaAuthPluginBase.plugin_settings.im_func:
+    if plugin.plugin_settings.__func__ != KallitheaAuthPluginBase.plugin_settings:
         raise TypeError("Authentication class %s.KallitheaAuthPluginBase "
                         "has overridden the plugin_settings method, which is "
                         "forbidden." % plugin)