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

Patches #59

Merged
merged 4 commits into from
Apr 20, 2016
Merged

Patches #59

merged 4 commits into from
Apr 20, 2016

Conversation

kashav
Copy link
Member

@kashav kashav commented Apr 20, 2016

Patched some stuff

  • JSON requests in Buildings
  • Max attempts for UTSG Exams
  • Use requests helper in Layers superclass

@@ -41,6 +41,7 @@ def get(url, params=None, cookies=None, headers=None, json=False, max_attempts=1
doc = r
else:
sleep(0.5)
attempts += 1
Copy link
Member Author

@kashav kashav Apr 20, 2016

Choose a reason for hiding this comment

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

Not sure if this was by design, but whenever the request 404'd, it'd go on forever.

Try it with UTSGExams (any period past the current one).

Copy link
Member

Choose a reason for hiding this comment

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

good catch

Copy link
Contributor

Choose a reason for hiding this comment

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

Whoops, yeah. we should better handle those errors anyway. I doubt there's any reason to try again if it got a 404.

Copy link
Member

Choose a reason for hiding this comment

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

CourseFinder often 404's, 401's, or 500's. It's a real pain.

@qasim qasim merged commit 3611d35 into cobalt-uoft:master Apr 20, 2016
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.

3 participants