diff mbox

[ovs-dev] python: Fix the TypeError exception seen when idl.Idl parses lock reply

Message ID 568F575B.4000100@redhat.com
State Accepted
Headers show

Commit Message

Numan Siddique Jan. 8, 2016, 6:29 a.m. UTC
File "/usr/lib/python2.7/site-packages/ovs/db/idl.py", line 334,
in __parse_lock_notify
  self.__update_has_lock(self, new_has_lock)
TypeError: __update_has_lock() takes exactly 2 arguments (3 given)

Signed-off-by: Numan Siddique <nusiddiq@redhat.com>
---
 python/ovs/db/idl.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Russell Bryant Jan. 8, 2016, 2:57 p.m. UTC | #1
On 01/08/2016 01:29 AM, Numan Siddique wrote:
> File "/usr/lib/python2.7/site-packages/ovs/db/idl.py", line 334,
> in __parse_lock_notify
>   self.__update_has_lock(self, new_has_lock)
> TypeError: __update_has_lock() takes exactly 2 arguments (3 given)
> 
> Signed-off-by: Numan Siddique <nusiddiq@redhat.com>

Thanks for the fix!  I pushed this to master and branch-2.5.
Russell Bryant Jan. 8, 2016, 7:38 p.m. UTC | #2
On 01/08/2016 09:57 AM, Russell Bryant wrote:
> On 01/08/2016 01:29 AM, Numan Siddique wrote:
>> File "/usr/lib/python2.7/site-packages/ovs/db/idl.py", line 334,
>> in __parse_lock_notify
>>   self.__update_has_lock(self, new_has_lock)
>> TypeError: __update_has_lock() takes exactly 2 arguments (3 given)
>>
>> Signed-off-by: Numan Siddique <nusiddiq@redhat.com>
> 
> Thanks for the fix!  I pushed this to master and branch-2.5.
> 

I meant to say this earlier.  This looks like a good candidate for a new
test case if you'd be interested in writing one.
Numan Siddique Jan. 11, 2016, 9:19 a.m. UTC | #3
On 01/09/2016 01:08 AM, Russell Bryant wrote:
>> Thanks for the fix!  I pushed this to master and branch-2.5.
>> > 
> I meant to say this earlier.  This looks like a good candidate for a new
> test case if you'd be interested in writing one.
Sure. I will work on the test cases for this.

Thanks
Numan
diff mbox

Patch

diff --git a/python/ovs/db/idl.py b/python/ovs/db/idl.py
index c251601..8fec8ae 100644
--- a/python/ovs/db/idl.py
+++ b/python/ovs/db/idl.py
@@ -332,7 +332,7 @@  class Idl(object):
             and type(params) in (list, tuple)
             and params
             and params[0] == self.lock_name):
-            self.__update_has_lock(self, new_has_lock)
+            self.__update_has_lock(new_has_lock)
             if not new_has_lock:
                 self.is_lock_contended = True