Signed-off-by: Isaku Yamahata <[email protected]>
---
ryu/app/client.py | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/ryu/app/client.py b/ryu/app/client.py
index d54fe44..fcf1283 100644
--- a/ryu/app/client.py
+++ b/ryu/app/client.py
@@ -18,6 +18,19 @@ import httplib
import urlparse
+def ignore_http_not_found(func):
+ """
+ Ignore http not found(404) with Ryu client library.
+ Ryu client raises httplib.HTTPException with an error in args[0]
+ """
+ try:
+ func()
+ except httplib.HTTPException as e:
+ res = e.args[0]
+ if res.status != httplib.NOT_FOUND:
+ raise
+
+
class RyuClientBase(object):
def __init__(self, version, address):
super(RyuClientBase, self).__init__()
--
1.7.10.4
------------------------------------------------------------------------------
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel