From 27f83c26020ce8af5fde466b6126b78835f29722 Mon Sep 17 00:00:00 2001 From: Jonathan Davies Date: Thu, 28 May 2009 03:12:35 -0400 Subject: [PATCH] pull-lp-source: Use launchpadlib instead of screen scraping to get and check if the Ubuntu release exists. --- pull-lp-source | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/pull-lp-source b/pull-lp-source index 7084d51..503027c 100755 --- a/pull-lp-source +++ b/pull-lp-source @@ -32,7 +32,8 @@ import sys import urllib2 from optparse import OptionParser -# Ubuntu-dev-tools modules. +# ubuntu-dev-tools modules. +import ubuntutools.lp.functions as lp_functions from ubuntutools import packages class BackportFromLP: @@ -58,7 +59,7 @@ class BackportFromLP: 'Ensure that the package specified is a valid source ' +\ 'package name and that Launchpad is not down.' -default_release = 'karmic' +default_release = lp_functions.ubuntuDevelopmentSeries() if __name__ == '__main__': usage = "Usage: %prog [release]" @@ -74,9 +75,9 @@ if __name__ == '__main__': else: release = os.getenv('DIST') or default_release - # Correct-ish args, can proceed. - # Check release by checking if Launchpad page exists - packages.checkReleaseExists(release) + # Arguments are correct, proceed. + # Check that the Ubuntu release specified exists. + lp_functions.doesUbuntuReleaseExist(release) # Check package exists. packages.checkSourceExists(package, release)