mirror of
https://github.com/openSUSE/osc.git
synced 2024-12-25 17:36:13 +01:00
- common.py, __get_response: support "code" keyword argument to specify the http status code
This commit is contained in:
parent
5f5ae8e22d
commit
e1080aa476
@ -73,7 +73,7 @@ class MyHTTPHandler(urllib2.HTTPHandler):
|
||||
else:
|
||||
raise RuntimeError('either specify text or file')
|
||||
resp = urllib2.addinfourl(f, {}, url)
|
||||
resp.code = 200
|
||||
resp.code = kwargs.get('code', 200)
|
||||
resp.msg = ''
|
||||
return resp
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user