diff options
| author | Michael Vogt <michael.vogt@ubuntu.com> | 2006-01-10 20:52:59 +0000 |
|---|---|---|
| committer | Michael Vogt <michael.vogt@ubuntu.com> | 2006-01-10 20:52:59 +0000 |
| commit | 905fa15d019d0134f98472133a46a84672781d92 (patch) | |
| tree | 92f09f4252d349e7acc761c141fe114594e21173 | |
| parent | 1b303cad60722bb73805c2b6ae3eb896a495fde2 (diff) | |
| download | python-apt-905fa15d019d0134f98472133a46a84672781d92.tar.gz | |
* don't return a apt.Package.sourcePackageName if _lookupRecord failed
| -rw-r--r-- | apt/package.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/apt/package.py b/apt/package.py index 019bf44c..6a3ade64 100644 --- a/apt/package.py +++ b/apt/package.py @@ -112,7 +112,8 @@ class Package(object): def sourcePackageName(self): """ Return the source package name as string """ - self._lookupRecord() + if not self._lookupRecord(): + return None src = self._records.SourcePkg if src != "": return src |
