mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-03-13 08:01:09 +00:00
Catch 404s (preliminary support)
This commit is contained in:
parent
8f914adf7a
commit
d0149b00d7
@ -15,7 +15,10 @@
|
|||||||
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
|
||||||
import optparse
|
import optparse
|
||||||
|
import urllib2
|
||||||
|
import sys
|
||||||
|
|
||||||
|
from devscripts.logger import Logger
|
||||||
from distro_info import UbuntuDistroInfo
|
from distro_info import UbuntuDistroInfo
|
||||||
|
|
||||||
from ubuntutools.rdepends import query_rdepends
|
from ubuntutools.rdepends import query_rdepends
|
||||||
@ -62,7 +65,13 @@ def main():
|
|||||||
if options.server is not None:
|
if options.server is not None:
|
||||||
opts['server'] = options.server
|
opts['server'] = options.server
|
||||||
|
|
||||||
|
try:
|
||||||
data = query_rdepends(package, options.release, options.arch, **opts)
|
data = query_rdepends(package, options.release, options.arch, **opts)
|
||||||
|
except urllib2.HTTPError, e:
|
||||||
|
if e.code == 404:
|
||||||
|
# TODO: Get a real error message through the HTTP response's status
|
||||||
|
Logger.error("Unable to determine rdepends")
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
if options.arch == 'source':
|
if options.arch == 'source':
|
||||||
fields = ['Reverse-Build-Depends', 'Reverse-Build-Depends-Indep']
|
fields = ['Reverse-Build-Depends', 'Reverse-Build-Depends-Indep']
|
||||||
|
Loading…
x
Reference in New Issue
Block a user