-
Notifications
You must be signed in to change notification settings - Fork 209
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 dynamic voting window #314
Conversation
@@ -206,14 +205,13 @@ def get_initial_voting_window(now): | |||
return seconds | |||
|
|||
|
|||
def get_extending_voting_window(api, urn): | |||
def get_extended_voting_window(api, urn): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the part that was crashing it.
@@ -29,6 +29,4 @@ def set_desc(api, urn, desc): | |||
def get_creation_date(api, urn): | |||
""" returns the creation date of the repo """ | |||
data = api("get", get_path(urn)) | |||
# this is the field for watchers. do not be tricked by "watchers_count" | |||
# which always matches "stargazers_count" | |||
return datetime.strptime(data["created_at"], "%Y-%m-%dT%H:%M:%SZ").date() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, how in the world did the PR get through with this comment? Did no one read the changes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Outch… sorry :/
Thank you! Sorry for the mess :/ |
So how does this get merged in? |
@mark-i-m the maintainer of chaosbot merges it. |
Ok it's been merged in, thanks for the hotfix @PlasmaPower |
Currently it crashes the server. I've also switched to arrow for anything datetime, as that's the standard for the project and it's a lot better than some hand rolled parsing.