diff options
| author | Michael Vogt <michael.vogt@ubuntu.com> | 2008-12-15 14:24:51 +0100 |
|---|---|---|
| committer | Michael Vogt <michael.vogt@ubuntu.com> | 2008-12-15 14:24:51 +0100 |
| commit | 481a90a820564dc12567348c16773e15cc129560 (patch) | |
| tree | c78e856a62331f7e3ae5fb4c017dd0f4fd96c6df /apt | |
| parent | 4dcfce5fd58b99b9aaf6acb2ab86d811b1f1a01d (diff) | |
| download | python-apt-481a90a820564dc12567348c16773e15cc129560.tar.gz | |
* setup.py:
- build html/ help of the apt and aptsources modules
into /usr/share/doc/python-apt/html
Diffstat (limited to 'apt')
| -rw-r--r-- | apt/package.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/apt/package.py b/apt/package.py index 94242e35..70ddbb1a 100644 --- a/apt/package.py +++ b/apt/package.py @@ -244,13 +244,15 @@ class Package(object): return self._records.ShortDesc summary = property(summary) - def description(self, format=True): + def description(self, format=True, useDots=False): """ Return the formated long description according to the Debian policy (Chapter 5.6.13). See http://www.debian.org/doc/debian-policy/ch-controlfields.html for more information. """ + if not format: + return self.rawDescription if not self._lookupRecord(): return "" # get the translated description @@ -289,7 +291,8 @@ class Package(object): else: line = raw_line # Use dots for lists - line = re.sub(r"^(\s*)(\*|0|o|-) ", ur"\1\u2022 ", line, 1) + if useDots: + line = re.sub(r"^(\s*)(\*|0|o|-) ", ur"\1\u2022 ", line, 1) # Add current line to the description desc += line return desc |
