mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-03-13 08:01:09 +00:00
* lpapiwrapper.py:
Add a Archive wrapper class.
This commit is contained in:
parent
fcf86d2ad2
commit
a178201eea
@ -253,7 +253,7 @@ class Distribution(BaseWrapper):
|
|||||||
@classmethod
|
@classmethod
|
||||||
def fetch(cls, dist):
|
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):
|
if not isinstance(dist, str):
|
||||||
raise TypeError("Don't know what do with '%r'" % dist)
|
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.
|
Returns the LP representation for the Ubuntu main archive.
|
||||||
'''
|
'''
|
||||||
if not '_archive' in self.__dict__:
|
if not '_archive' in self.__dict__:
|
||||||
self._archive = self.main_archive
|
self._archive = Archive(self.main_archive_link)
|
||||||
return self._archive
|
return self._archive
|
||||||
|
|
||||||
def getSeries(self, name_or_version):
|
def getSeries(self, name_or_version):
|
||||||
@ -305,6 +305,13 @@ class DistroSeries(BaseWrapper):
|
|||||||
resource_type = 'https://api.edge.launchpad.net/beta/#distro_series'
|
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):
|
class SourcePackage(BaseWrapper):
|
||||||
'''
|
'''
|
||||||
Wrapper class around a LP source package object.
|
Wrapper class around a LP source package object.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user