diff --git a/osc/core.py b/osc/core.py index 323a638b..e14338fb 100755 --- a/osc/core.py +++ b/osc/core.py @@ -1385,12 +1385,15 @@ def http_request(method, url, headers={}, data=None, file=None): else: raise - # this handling is currently considered as temporary workaround, bug #378421 try: fd = urllib2.urlopen(req, data=data) - finally: + + except urllib2.HTTPError: + # make sure that cookies are saved nevertheless if hasattr(conf.cookiejar, 'save'): conf.cookiejar.save(ignore_discard=True) + # handle the exception elsewhere + raise if filefd: filefd.close()