diff options
author | Isaku Yamahata <yamahata@valinux.co.jp> | 2012-02-02 14:48:37 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2012-02-03 08:59:20 +0900 |
commit | 89a3f010b8a66e395d399ec8ddd645d9ec54fcb2 (patch) | |
tree | 4931bf40153b90e73576fced212f42bd19e53b22 | |
parent | c22ef47a9c4370da3edcc6290a0227fa646e8a1a (diff) |
client: pass http responce when an error occurs
Thus the caller can examine error code instead of abort blindly
and can provide more informative message.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
-rw-r--r-- | ryu/app/client.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ryu/app/client.py b/ryu/app/client.py index 1371a06e..bc1640f4 100644 --- a/ryu/app/client.py +++ b/ryu/app/client.py @@ -41,8 +41,9 @@ class OFPClientV1_0(object): httplib.NO_CONTENT): return res - raise httplib.HTTPException('code %d reason %s' % - (res.status, res.reason)) + raise httplib.HTTPException( + res, 'code %d reason %s' % (res.status, res.reason), + res.getheaders(), res.read()) def get_networks(self): res = self._do_request('GET', '') |