Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit24effa4

Browse files
committed
fixed up the getattr stuff
1 parent3d203a0 commit24effa4

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

‎lib/git/method_missing.py

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,13 @@ class MethodMissingMixin(object):
55
This was `taken from a blog post <http://blog.iffy.us/?p=43>`_
66
"""
77
def__getattr__(self,attr):
8-
try:
9-
returnobject.__getattribute__(self,attr)
10-
except:
11-
classMethodMissing(object):
12-
def__init__(self,wrapped,method):
13-
self.__wrapped__=wrapped
14-
self.__method__=method
15-
def__call__(self,*args,**kwargs):
16-
returnself.__wrapped__.method_missing(self.__method__,*args,**kwargs)
17-
returnMethodMissing(self,attr)
8+
classMethodMissing(object):
9+
def__init__(self,wrapped,method):
10+
self.__wrapped__=wrapped
11+
self.__method__=method
12+
def__call__(self,*args,**kwargs):
13+
returnself.__wrapped__.method_missing(self.__method__,*args,**kwargs)
14+
returnMethodMissing(self,attr)
1815

1916
defmethod_missing(self,*args,**kwargs):
2017
""" This method should be overridden in the derived class. """

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp