summaryrefslogtreecommitdiff
path: root/jfr_playoff/matchinfo.py
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2018-02-23 10:40:06 +0100
committeremkael <emkael@tlen.pl>2018-02-23 10:40:06 +0100
commitf14ddbc913b3fb278ec48a4004ebce4737b93355 (patch)
tree9f423167fe265032564256aa05b963462bde37ed /jfr_playoff/matchinfo.py
parent2f4f93417bd0f3f6886a2a04ec0ef2054633d6b3 (diff)
Getting rid of global mysql imports
Diffstat (limited to 'jfr_playoff/matchinfo.py')
-rw-r--r--jfr_playoff/matchinfo.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/jfr_playoff/matchinfo.py b/jfr_playoff/matchinfo.py
index 538c67d..f65c23c 100644
--- a/jfr_playoff/matchinfo.py
+++ b/jfr_playoff/matchinfo.py
@@ -1,8 +1,6 @@
import re
from urlparse import urljoin
-import mysql
-
import jfr_playoff.sql as p_sql
from jfr_playoff.dto import Match, Team
from jfr_playoff.remote import RemoteUrl as p_remote
@@ -153,7 +151,7 @@ class MatchInfo:
raise KeyError('database not configured')
self.info.teams = self.__get_db_teams(
self.info.teams, not scores_fetched)
- except (mysql.connector.Error, TypeError, IndexError, KeyError):
+ except (IOError, TypeError, IndexError, KeyError):
self.info.teams = self.__get_html_teams(
self.info.teams, not scores_fetched)
except (TypeError, IndexError, KeyError, IOError, ValueError):
@@ -242,7 +240,7 @@ class MatchInfo:
if self.database is None:
raise KeyError('database not configured')
boards_played, boards_to_play = self.__get_db_board_count()
- except (mysql.connector.Error, TypeError, IndexError, KeyError):
+ except (IOError, TypeError, IndexError, KeyError):
try:
boards_played, boards_to_play = self.__get_html_board_count()
except (TypeError, IndexError, KeyError, IOError, ValueError):
@@ -287,7 +285,7 @@ class MatchInfo:
raise KeyError('database not configured')
self.info.link = self.__get_db_running_link(
link_match.group(1), link_match.group(2))
- except (mysql.connector.Error, TypeError, IndexError, KeyError):
+ except (IOError, TypeError, IndexError, KeyError):
try:
self.info.link = self.__get_html_running_link()
except (TypeError, IndexError, KeyError, IOError, ValueError):