diff --git a/osclib/request_finder.py b/osclib/request_finder.py index ca24337b..37d74838 100644 --- a/osclib/request_finder.py +++ b/osclib/request_finder.py @@ -17,7 +17,7 @@ class RequestFinder: url = makeurl(apiurl, ['request', str(request)]) try: f = http_GET(url) - except HTTPError: + except urllib2.HTTPError: return None root = ET.parse(f).getroot() diff --git a/osclib/stagingapi.py b/osclib/stagingapi.py index 790e33ae..14b2228f 100644 --- a/osclib/stagingapi.py +++ b/osclib/stagingapi.py @@ -430,13 +430,14 @@ class StagingAPI(object): try: f = http_GET(url) - except HTTPError: + except urllib2.HTTPError: return 'No openQA result (yet) for {}'.format(url) import json openqa = json.load(f) - if openqa['overall'] != 'ok': - return "Openqa's overall status is {}".format(openqa['overall']) + overall = openqa.get('overall', 'inprogress') + if overall != 'ok': + return "Openqa's overall status is {}".format(overall) for module in openqa['testmodules']: # zypper_in fails at the moment - urgent fix needed