summaryrefslogtreecommitdiff
path: root/jfr_playoff/matchinfo.py
diff options
context:
space:
mode:
authorMichaƂ Klichowicz <emkael@tlen.pl>2018-02-23 16:06:59 +0100
committerGitHub <noreply@github.com>2018-02-23 16:06:59 +0100
commit320868f72185630b59cc690e81fbb1f76e92075b (patch)
treea88e5a7aefddac8272e1d3a39c4da6e4db96b5b3 /jfr_playoff/matchinfo.py
parent2f4f93417bd0f3f6886a2a04ec0ef2054633d6b3 (diff)
parentcab639df56676443dc7cd8b5ef3dc9ac5dae830b (diff)
Merge pull request #19 from emkael/mysql-import-on-demand
Mysql import on demand
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):