Skip to content

Commit

Permalink
[courtbooking] Use patched version of splinter to avoid issue 460
Browse files Browse the repository at this point in the history
Splinter StatusCode didnt implement __ne()__ causing issues with Python
2.7.x. We will use a patched version of splinter for issue 460 [1] available
as pull request 461 [2].

[1] cobrateam/splinter#460
[2] cobrateam/splinter#461
  • Loading branch information
bharath23 committed Jan 23, 2016
1 parent 75a280c commit 290c872
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions courtbooking/courtbooking.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def court_booking_login(user, passwd):
"""
browser = Browser()
browser.visit("https://courtbooking.bayclubs.com")
if browser.status_code.code != 200:
if browser.status_code != 200:
logging.error("court_booking_login: Unable to open court booking "
"website")
browser.quit()
Expand All @@ -88,7 +88,7 @@ def court_booking_login(user, passwd):
input_passwd.fill(passwd)
login_button = browser.find_by_id("loginButton")
login_button.click()
if browser.status_code.code != 200:
if browser.status_code != 200:
logging.error("court_booking_login: Error unable to login into court "
"booking website")
browser.quit()
Expand Down Expand Up @@ -167,7 +167,7 @@ def bccu_reserve_court(user, passwd, start, end):

date_select = browser.find_by_id("myid")
date_select.select(datetime.datetime.strftime(booking_date, "%Y-%m-%d"))
if browser.status_code.code != 200 and browser.status_code.code != 302:
if browser.status_code != 200 and browser.status_code != 302:
logging.error("bccu_reserve_court: status_code: %s",
browser.status_code)
logging.error("bccu_reserve_court: Unable to get court booking page "
Expand Down

0 comments on commit 290c872

Please sign in to comment.