migration.py
branchstable
changeset 6362 1b5fc8581437
parent 6221 a5cc5dc15f9d
child 6657 402bff898024
--- a/migration.py	Wed Sep 29 12:18:06 2010 +0200
+++ b/migration.py	Wed Sep 29 12:44:11 2010 +0200
@@ -129,7 +129,8 @@
             return object.__getattribute__(self, name)
         except AttributeError:
             cmd = 'cmd_%s' % name
-            if hasattr(self, cmd):
+            # search self.__class__ to avoid infinite recursion
+            if hasattr(self.__class__, cmd):
                 meth = getattr(self, cmd)
                 return lambda *args, **kwargs: self.interact(args, kwargs,
                                                              meth=meth)