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

isodate.duration_isoformat does not raise Exception for wrong input type #56

Open
GiorgioBalestrieri opened this issue Feb 13, 2019 · 0 comments

Comments

@GiorgioBalestrieri
Copy link

Hi,

I just noticed that isodate.duration_isoformat does not raise an Exception if invalid inputs are passed, even if the type is wrong. Instead, it returns 'P%P'. I don't know the internals, but a check on the validity of the inputs would make this much safer.

>>> isodate.duration_isoformat('ajaksdf')
'P%P'
>>> isodate.duration_isoformat(1000)
'P%P'
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

1 participant