summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorSteven Myint <git@stevenmyint.com>2013-10-04 10:54:34 -0700
committerSteven Myint <git@stevenmyint.com>2013-10-04 10:54:34 -0700
commitdc82565bacb99cfc29f1caa4e5cca82f57c7440e (patch)
tree5c709cab9a3c4e88faab4bfea60a311a8c303dcc /examples
parent9e8da213f4883b146ac44cdc244393e215e36664 (diff)
downloadpexpect-dc82565bacb99cfc29f1caa4e5cca82f57c7440e.tar.gz
Update conditional to match "__func__" access
Diffstat (limited to 'examples')
-rwxr-xr-xexamples/rippy.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/rippy.py b/examples/rippy.py
index c0494cb..4984e35 100755
--- a/examples/rippy.py
+++ b/examples/rippy.py
@@ -379,7 +379,7 @@ def apply_smart (func, args):
func = globals()[func]
else:
raise NameError("name '%s' is not defined" % func)
- if hasattr(func,'im_func'): # Handle case when func is a class method.
+ if hasattr(func, '__func__'): # Handle case when func is a class method.
func = func.__func__
argcount = func.__code__.co_argcount
required_args = dict([(k,args.get(k)) for k in func.__code__.co_varnames[:argcount]])