From ccfd193139512cd1427d6e52d6ebd3ede833c2c3 Mon Sep 17 00:00:00 2001 From: Karthik Ramasubramanian Date: Sun, 15 Jun 2014 04:18:03 -0700 Subject: [PATCH] Only raise error if meter mod context is present --- ryu/controller/api.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ryu/controller/api.py b/ryu/controller/api.py index 0e88bc68..bc316ed5 100644 --- a/ryu/controller/api.py +++ b/ryu/controller/api.py @@ -541,9 +541,9 @@ class RpcOFPManager(app_manager.RyuApp): elif (ofmsg.command is dp.ofproto.OFPMC_DELETE and ofmsg.meter_id in self.monitored_meters): del self.monitored_meters[ofmsg.meter_id] - elif (ofmsg.command is dp.ofproto.OFPMC_MODIFY and - contexts is not None): - raise RPCError('METER_MOD with contexts is not supported') + elif ofmsg.command is dp.ofproto.OFPMC_MODIFY: + if contexts is not None: + raise RPCError('METER_MOD with contexts is not supported') else: raise RPCError('unknown meter_mod command') else: