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 dynamic voting window #314

Merged
merged 1 commit into from
May 27, 2017

Conversation

PlasmaPower
Copy link
Contributor

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.

@@ -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):
Copy link
Contributor Author

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()
Copy link
Contributor Author

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?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Outch… sorry :/

@flibustier
Copy link
Contributor

Thank you! Sorry for the mess :/

@mark-i-m
Copy link
Contributor

So how does this get merged in?

@PlasmaPower
Copy link
Contributor Author

@mark-i-m the maintainer of chaosbot merges it.

@chaosbot chaosbot merged commit 9e84d31 into Chaosthebot:master May 27, 2017
@amoffat
Copy link
Contributor

amoffat commented May 27, 2017

Ok it's been merged in, thanks for the hotfix @PlasmaPower

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.

5 participants