for code compatible with Python 3, we should use the "__self__" instead of "im_self".
for example :
cinder/volume/flows/common.py
def make_pretty_name(method):
"""Makes a pretty name for a function/method."""
meth_pieces = [method.__name__]
# If its an instance method attempt to tack on the class name
if hasattr(method, 'im_self') and method.im_self is not None:
try: meth_pieces.insert(0, method.im_self.__class__.__name__)
except AttributeError:
pass
return ".".join(meth_pieces)
for code compatible with Python 3, we should use the "__self__" instead of "im_self". volume/ flows/common. py
for example :
cinder/
def make_pretty_ name(method) :
meth_ pieces. insert( 0, method. im_self. __class_ _.__name_ _) meth_pieces)
"""Makes a pretty name for a function/method."""
meth_pieces = [method.__name__]
# If its an instance method attempt to tack on the class name
if hasattr(method, 'im_self') and method.im_self is not None:
try:
except AttributeError:
pass
return ".".join(