From a178201eeadc743e64b389eb7db092d0ade45f6b Mon Sep 17 00:00:00 2001 From: Michael Bienia Date: Wed, 22 Jul 2009 14:26:27 +0200 Subject: [PATCH] * lpapiwrapper.py: Add a Archive wrapper class. --- ubuntutools/lp/lpapiwrapper.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/ubuntutools/lp/lpapiwrapper.py b/ubuntutools/lp/lpapiwrapper.py index f7fa0cb..01073f4 100644 --- a/ubuntutools/lp/lpapiwrapper.py +++ b/ubuntutools/lp/lpapiwrapper.py @@ -253,7 +253,7 @@ class Distribution(BaseWrapper): @classmethod def fetch(cls, dist): ''' - Fetch the distribution object identified by 'url' from LP. + Fetch the distribution object identified by 'dist' from LP. ''' if not isinstance(dist, str): raise TypeError("Don't know what do with '%r'" % dist) @@ -267,7 +267,7 @@ class Distribution(BaseWrapper): Returns the LP representation for the Ubuntu main archive. ''' if not '_archive' in self.__dict__: - self._archive = self.main_archive + self._archive = Archive(self.main_archive_link) return self._archive def getSeries(self, name_or_version): @@ -305,6 +305,13 @@ class DistroSeries(BaseWrapper): resource_type = 'https://api.edge.launchpad.net/beta/#distro_series' +class Archive(BaseWrapper): + ''' + Wrapper class around a LP archive object. + ''' + resource_type = 'https://api.edge.launchpad.net/beta/#archive' + + class SourcePackage(BaseWrapper): ''' Wrapper class around a LP source package object.