mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-03-13 08:01:09 +00:00
ubuntutools/lp/lpapicache.py: Add __repr__() to the BaseWrapper class
This commit is contained in:
parent
4f21ae1cd0
commit
b101712009
@ -124,6 +124,11 @@ class BaseWrapper(object):
|
|||||||
def __getattr__(self, attr):
|
def __getattr__(self, attr):
|
||||||
return getattr(self._lpobject, attr)
|
return getattr(self._lpobject, attr)
|
||||||
|
|
||||||
|
def __repr__(self):
|
||||||
|
if hasattr(str, 'format'):
|
||||||
|
return '<{0}: {1!r}>'.format(self.__class__.__name__, self._lpobject)
|
||||||
|
else:
|
||||||
|
return '<%s: %r>' % (self.__class__.__name__, self._lpobject)
|
||||||
|
|
||||||
class Distribution(BaseWrapper):
|
class Distribution(BaseWrapper):
|
||||||
'''
|
'''
|
||||||
|
Loading…
x
Reference in New Issue
Block a user