mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-03-12 23:51:08 +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):
|
||||
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):
|
||||
'''
|
||||
|
Loading…
x
Reference in New Issue
Block a user