From 2f737cb5beecce2ee4341ebdac113aa9fd17f97d Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Mon, 11 Feb 2008 10:34:04 +0100 Subject: apt/package.py: make the homepage field accessable --- apt/package.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/apt/package.py b/apt/package.py index 49aadd20..ac045969 100644 --- a/apt/package.py +++ b/apt/package.py @@ -194,6 +194,13 @@ class Package(object): return self._pkg.Name sourcePackageName = property(sourcePackageName) + def homepage(self): + """ Return the homepage field as string """ + if not self._lookupRecord(): + return None + return self._records.Homepage + homepage = property(homepage) + def section(self): """ Return the section of the package""" return self._pkg.Section @@ -449,6 +456,7 @@ if __name__ == "__main__": for dep in pkg.candidateDependencies: print ",".join(["%s (%s) (%s) (%s)" % (o.name,o.version,o.relation, o.preDepend) for o in dep.or_dependencies]) print "arch: %s" % pkg.architecture + print "homepage: %s" % pkg.homepage print "rec: ",pkg.candidateRecord # now test install/remove -- cgit v1.2.3