perfsonar / bwctl

A scheduling and policy framework for measurement tools
Apache License 2.0
16 stars 6 forks source link

bwctl2: TypeError: check() got an unexpected keyword argument 'address' #25

Closed vvidic closed 8 years ago

vvidic commented 9 years ago

While testing bwctl2 packaging on Debian I ran into the following issue:

$ bwping2 -c 192.168.122.2 -s 192.168.122.236
Server returned error 402: check() got an unexpected keyword argument 'address'
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/bwctl/server/coordinator.py", line 84, in request_test
    self.limits_db.check_test(test, address=requesting_address)
  File "/usr/lib/python2.7/dist-packages/bwctl/server/limits.py", line 256, in check_test
    limit.check(test, address=None)
TypeError: check() got an unexpected keyword argument 'address'

None

After changing limit.check(test, address=None) to limit.check(test) things seem to work.

Can someone check if this is the correct solution?

mfeit-internet2 commented 9 years ago

That looks like a good fix. The code is (ab)using the limit.check() prototype, which is an offense that won't get caught until runtime.

I'm still getting up to speed on the BWCTL2 code, so take that with a grain or boulder of salt depending on your inclination. :-)

arlake228 commented 8 years ago

bwctl2 has been abandoned, so closing