summaryrefslogtreecommitdiff
path: root/AptSources/DistInfo.py
diff options
context:
space:
mode:
authorSebastian Heinlein <sebi@sebi-laptop>2006-12-04 06:13:09 +0100
committerSebastian Heinlein <sebi@sebi-laptop>2006-12-04 06:13:09 +0100
commit4ed8672b734132995f16ccb6fa99fe105dd56a48 (patch)
treef2782fea6b9832e9e485de2d00f8851757aa9bb5 /AptSources/DistInfo.py
parent21a2e05e903ace1ba6ac977811074146973fb4f4 (diff)
parent359db816dd1d9aecce9800742fdc1ed45846ee7e (diff)
downloadpython-apt-4ed8672b734132995f16ccb6fa99fe105dd56a48.tar.gz
* merge with ubuntu
Diffstat (limited to 'AptSources/DistInfo.py')
-rw-r--r--AptSources/DistInfo.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/AptSources/DistInfo.py b/AptSources/DistInfo.py
index 41edd75c..6387dbd2 100644
--- a/AptSources/DistInfo.py
+++ b/AptSources/DistInfo.py
@@ -43,6 +43,17 @@ class Suite:
self.distribution = None
self.available = True
+ def get_comp_desc(self, comp, short=False):
+ ''' Return a human readable description of a component '''
+ if self.components.has_key(comp):
+ if self.components[comp][1] == "" or short == True:
+ return self.components[comp][0]
+ elif self.components[comp][1] != "":
+ return self.components[comp][1]
+ else:
+ return "Unnamed component"
+ return None
+
class Component:
def __init__(self):
self.name = ""