mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-04-12 02:41:07 +00:00
backportpackage: don't use SourcePackage() directly
As the warning from 2010 says, don't use this class directly.
This commit is contained in:
parent
f97b19554f
commit
85ed9ad1ce
@ -30,7 +30,7 @@ from urllib.parse import quote
|
||||
import lsb_release
|
||||
from httplib2 import Http, HttpLib2Error
|
||||
|
||||
from ubuntutools.archive import (SourcePackage, DebianSourcePackage,
|
||||
from ubuntutools.archive import (DebianSourcePackage,
|
||||
UbuntuSourcePackage, DownloadError)
|
||||
from ubuntutools.config import UDTConfig, ubu_email
|
||||
from ubuntutools.builder import get_builder
|
||||
@ -201,8 +201,8 @@ def find_release_package(mirror, workdir, package, version, source_release,
|
||||
def find_package(mirror, workdir, package, version, source_release, config):
|
||||
"Returns the SourcePackage"
|
||||
if package.endswith('.dsc'):
|
||||
return SourcePackage(version=version, dscfile=package,
|
||||
workdir=workdir, mirrors=(mirror,))
|
||||
return UbuntuSourcePackage(version=version, dscfile=package,
|
||||
workdir=workdir, mirrors=(mirror,))
|
||||
|
||||
if not source_release and not version:
|
||||
info = vendor_to_distroinfo(system_distribution())
|
||||
|
Loading…
x
Reference in New Issue
Block a user