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

Fix case where transition can be None #350

Merged

Conversation

jacebrowning
Copy link
Contributor

When calling .subtract(days=days) with the maximum value ("now" - datetime.min), the following exception is raised:

>       if transition.is_ambiguous(sec):
E       AttributeError: 'NoneType' object has no attribute 'is_ambiguous'

@jacebrowning jacebrowning force-pushed the fix-nonetype-transition branch from ad1ac37 to b545b77 Compare March 3, 2019 02:36
@jacebrowning
Copy link
Contributor Author

@sdispater Please let me know if there is a cleaner way to solve this.

FYI: The InvalidPosixSpec test seems to be failing on master.

@sdispater sdispater merged commit 0753a3f into python-pendulum:master Mar 6, 2020
@sdispater
Copy link
Collaborator

Thanks for your contribution!

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

Successfully merging this pull request may close these issues.

2 participants