You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On the current master (and I think it at least affects the 2.1.x series as well), using camqadm with yes/no options throws 'too many values to unpack' exceptions.
This recreates the error:
camqadm queue.declare myqueue no yes no no
Using the same command, but without the yes/no options does not raise an exception.
Here is the current contents of the Spec.coerce() method in the celery.bin.camqadm module, followed by my proposed fix:
Current camqadm.py (lines 69-81):
def coerce(self, index, value):
"""Coerce value for argument at index.
E.g. if :attr:`args` is `[("is_active", bool)]`:
>>> coerce(0, "False")
False
"""
arg_name, arg_type = self.args[index]
# Might be a custom way to coerce the string value,
# so look in the coercion map.
return COERCE.get(arg_type, arg_type)(value)
Here is my suggested fix:
def coerce(self, index, value):
"""Coerce value for argument at index.
E.g. if :attr:`args` is `[("is_active", bool)]`:
>>> coerce(0, "False")
False
"""
arg_info = self.args[index]
arg_type = arg_info[1]
# Might be a custom way to coerce the string value,
# so look in the coercion map.
return COERCE.get(arg_type, arg_type)(value)
The fix is only a couple of lines, so I'm hoping posting it here is acceptable instead of doing a full pull request.
Thanks,
David White
The text was updated successfully, but these errors were encountered:
On the current master (and I think it at least affects the 2.1.x series as well), using camqadm with yes/no options throws 'too many values to unpack' exceptions.
This recreates the error:
Using the same command, but without the yes/no options does not raise an exception.
Here is the current contents of the Spec.coerce() method in the celery.bin.camqadm module, followed by my proposed fix:
Current camqadm.py (lines 69-81):
Here is my suggested fix:
The fix is only a couple of lines, so I'm hoping posting it here is acceptable instead of doing a full pull request.
Thanks,
David White
The text was updated successfully, but these errors were encountered: