1 |
commit: da059384996e9657d166673a3edeabcdde9199d2 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Jul 26 16:36:51 2011 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Jul 26 16:36:51 2011 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/gentoopm.git;a=commit;h=da059384 |
7 |
|
8 |
Support __repr__ on depspecs. |
9 |
|
10 |
--- |
11 |
gentoopm/basepm/depend.py | 6 ++++++ |
12 |
1 files changed, 6 insertions(+), 0 deletions(-) |
13 |
|
14 |
diff --git a/gentoopm/basepm/depend.py b/gentoopm/basepm/depend.py |
15 |
index 8d7005d..262a010 100644 |
16 |
--- a/gentoopm/basepm/depend.py |
17 |
+++ b/gentoopm/basepm/depend.py |
18 |
@@ -30,6 +30,12 @@ class PMBaseDep(ABCObject): |
19 |
""" |
20 |
pass |
21 |
|
22 |
+ def __repr__(self): |
23 |
+ l = ['\n'.join(['\t%s' % x for x in repr(d).splitlines()]) |
24 |
+ for d in self] |
25 |
+ return '%s(\n%s)' % (self.__class__.__name__, |
26 |
+ ',\n'.join(l)) |
27 |
+ |
28 |
class PMUncondBaseDep(PMBaseDep): |
29 |
def __init__(self, parent): |
30 |
self._parent = parent |