Skip to content

Commit

Permalink
revert try except
Browse files Browse the repository at this point in the history
  • Loading branch information
pretrehr committed Aug 12, 2021
1 parent e28086e commit 18e5965
Showing 1 changed file with 15 additions and 18 deletions.
33 changes: 15 additions & 18 deletions sportsbetting/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,24 +97,21 @@ def find_files(filename, search_path):
.format(colorama.Style.RESET_ALL),
'yellow'))

try:
chromedriver_version = ""
if sys.platform.startswith("win"):
chromedriver_version = PATH_DRIVER.split("\\")[-2]
else:
chromedriver_version = PATH_DRIVER.split("/")[-2]
if chrome_version.split(".")[0] == chromedriver_version:
print(termcolor.colored('Matching Chrome and chromedriver versions{}'
.format(colorama.Style.RESET_ALL),
'green'))
else:
print(termcolor.colored('Unmatching Chrome and chromedriver versions\nPlease update Chrome{}'
.format(colorama.Style.RESET_ALL),
'yellow'))
print(PATH_DRIVER)
colorama.deinit()
except IndexError:
pass
chromedriver_version = ""
if sys.platform.startswith("win"):
chromedriver_version = PATH_DRIVER.split("\\")[-2]
else:
chromedriver_version = PATH_DRIVER.split("/")[-2]
if chrome_version.split(".")[0] == chromedriver_version:
print(termcolor.colored('Matching Chrome and chromedriver versions{}'
.format(colorama.Style.RESET_ALL),
'green'))
else:
print(termcolor.colored('Unmatching Chrome and chromedriver versions\nPlease update Chrome{}'
.format(colorama.Style.RESET_ALL),
'yellow'))
print(PATH_DRIVER)
colorama.deinit()

PATH_DB = os.path.dirname(__file__) + "/resources/teams.db"

Expand Down

0 comments on commit 18e5965

Please sign in to comment.