diff options
author | emkael <emkael@tlen.pl> | 2018-02-23 10:40:06 +0100 |
---|---|---|
committer | emkael <emkael@tlen.pl> | 2018-02-23 10:40:06 +0100 |
commit | f14ddbc913b3fb278ec48a4004ebce4737b93355 (patch) | |
tree | 9f423167fe265032564256aa05b963462bde37ed /jfr_playoff/tournamentinfo.py | |
parent | 2f4f93417bd0f3f6886a2a04ec0ef2054633d6b3 (diff) |
Getting rid of global mysql imports
Diffstat (limited to 'jfr_playoff/tournamentinfo.py')
-rw-r--r-- | jfr_playoff/tournamentinfo.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/jfr_playoff/tournamentinfo.py b/jfr_playoff/tournamentinfo.py index 90637bc..ee96214 100644 --- a/jfr_playoff/tournamentinfo.py +++ b/jfr_playoff/tournamentinfo.py @@ -1,8 +1,6 @@ from math import ceil import re -import mysql - import jfr_playoff.sql as p_sql from jfr_playoff.remote import RemoteUrl as p_remote @@ -118,7 +116,7 @@ class TournamentInfo: teams = [] try: teams = self.__get_db_results() - except (mysql.connector.Error, TypeError, IndexError, KeyError): + except (IOError, TypeError, IndexError, KeyError): try: teams = self.__get_html_results() except (TypeError, IndexError, KeyError, IOError, ValueError): @@ -132,7 +130,7 @@ class TournamentInfo: def is_finished(self): try: return self.__get_db_finished() - except (mysql.connector.Error, TypeError, IndexError, KeyError): + except (IOError, TypeError, IndexError, KeyError): try: return self.__get_html_finished() except (TypeError, IndexError, KeyError, IOError, ValueError): @@ -142,7 +140,7 @@ class TournamentInfo: def get_results_link(self, suffix='leaderb.html'): try: return self.__get_db_link(suffix) - except (mysql.connector.Error, TypeError, IndexError, KeyError): + except (IOError, TypeError, IndexError, KeyError): try: return self.__get_html_link(suffix) except (KeyError, ValueError): |