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
I have been attempting to create a vacation filter using the add_to_filterset function, as per the following example. I have reduced the actual parameters for the purpose of this issue, but the error is still replicated:
Obviously the startswith method is not present on Python integers. In addition, attempting to cast the int to a string results in a commands.BadValue Exception being raised.
Delving into the commands.py module, it is clear the VacationCommand definition is accepting a argument of type "number" (https://github.com/tonioo/sievelib/blob/1.2.1/sievelib/commands.py#L1026), which according to the above code reference, seems as if it can never be passed in via the factory.
I believe the factory.py method should be updated to check for numeric arguments, and pass in the appropriate "number" type via atype = "number".
I have only just started to use sievelib so please forgive any ignorance in this issue, but I would be happy to submit a pull request if required.
The text was updated successfully, but these errors were encountered:
I have been attempting to create a vacation filter using the add_to_filterset function, as per the following example. I have reduced the actual parameters for the purpose of this issue, but the error is still replicated:
This gives an AttributeError: AttributeError: 'int' object has no attribute 'startswith'
The offending code appears to be this line (https://github.com/tonioo/sievelib/blob/1.2.1/sievelib/factory.py#L260):
Obviously the startswith method is not present on Python integers. In addition, attempting to cast the int to a string results in a commands.BadValue Exception being raised.
Delving into the commands.py module, it is clear the VacationCommand definition is accepting a argument of type "number" (https://github.com/tonioo/sievelib/blob/1.2.1/sievelib/commands.py#L1026), which according to the above code reference, seems as if it can never be passed in via the factory.
I believe the factory.py method should be updated to check for numeric arguments, and pass in the appropriate "number" type via atype = "number".
I have only just started to use sievelib so please forgive any ignorance in this issue, but I would be happy to submit a pull request if required.
The text was updated successfully, but these errors were encountered: