Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issue in translating day of week combination #6

Closed
a-dekker opened this issue May 17, 2016 · 2 comments
Closed

issue in translating day of week combination #6

a-dekker opened this issue May 17, 2016 · 2 comments

Comments

@a-dekker
Copy link

Hi Salamek,

I noticed the combination of individual weekdays and a range leads to syntax errors:

>>> from cron_descriptor import get_description, ExpressionDescriptor
>>> print(get_description("38 20 * * 0,2,3-6"))
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.7/site-packages/cron_descriptor/ExpressionDescriptor.py", line 568, in get_description
    return descripter.get_description(DescriptionTypeEnum.FULL)
  File "/usr/lib/python2.7/site-packages/cron_descriptor/ExpressionDescriptor.py", line 101, in get_description
    description = choices.get(description_type, self.get_seconds_description)()
  File "/usr/lib/python2.7/site-packages/cron_descriptor/ExpressionDescriptor.py", line 151, in get_full_description
    raise FormatException(description)
cron_descriptor.Exception.FormatException: An error occured when generating the expression description.  Check the cron expression syntax.

Just ranges or individual weekdays do work ok.

@Salamek
Copy link
Owner

Salamek commented May 18, 2016

@a-dekker fixed in release 1.2.5, pip updated

@a-dekker
Copy link
Author

No longer getting the error, thanks for the fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants