summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2018-02-24 11:04:11 +0100
committeremkael <emkael@tlen.pl>2018-02-24 11:04:11 +0100
commit8c500a75a6eafd65b332d0f8346d9059d5293cbb (patch)
tree547f04e9c5888656124917562d8c809f058a15cc
parentc00ca25512ca244cd15ecb79d269ebb60a6c70bf (diff)
Extracting text representation of an exception instead of explicit .message propertyverbose_logging
-rw-r--r--jfr_playoff/matchinfo.py14
-rw-r--r--jfr_playoff/settings.py2
-rw-r--r--jfr_playoff/tournamentinfo.py12
3 files changed, 14 insertions, 14 deletions
diff --git a/jfr_playoff/matchinfo.py b/jfr_playoff/matchinfo.py
index db49b07..8132fe2 100644
--- a/jfr_playoff/matchinfo.py
+++ b/jfr_playoff/matchinfo.py
@@ -179,13 +179,13 @@ class MatchInfo:
except (IOError, TypeError, IndexError, KeyError) as e:
PlayoffLogger.get('matchinfo').warning(
'fetching DB scores for match #%d failed: %s(%s)',
- self.info.id, type(e).__name__, e.message)
+ self.info.id, type(e).__name__, str(e))
self.info.teams = self.__get_html_teams(
self.info.teams, not scores_fetched)
except (TypeError, IndexError, KeyError, IOError, ValueError) as e:
PlayoffLogger.get('matchinfo').warning(
'fetching HTML scores for match #%d failed: %s(%s)',
- self.info.id, type(e).__name__, e.message)
+ self.info.id, type(e).__name__, str(e))
self.info.teams = self.__get_config_teams(self.info.teams)
def __get_db_board_count(self):
@@ -237,7 +237,7 @@ class MatchInfo:
except IOError as e:
PlayoffLogger.get('matchinfo').info(
'cannot fetch HTML played boards count for segment: %s(%s)',
- self.info.id, type(e).__name__, e.message)
+ self.info.id, type(e).__name__, str(e))
return 0, False
return 0, False
@@ -288,13 +288,13 @@ class MatchInfo:
except (IOError, TypeError, IndexError, KeyError) as e:
PlayoffLogger.get('matchinfo').warning(
'fetching board count from DB for match #%d failed: %s(%s)',
- self.info.id, type(e).__name__, e.message)
+ self.info.id, type(e).__name__, str(e))
try:
boards_played, boards_to_play = self.__get_html_board_count()
except (TypeError, IndexError, KeyError, IOError, ValueError) as e:
PlayoffLogger.get('matchinfo').warning(
'fetching board count from HTML for match #%d failed: %s(%s)',
- self.info.id, type(e).__name__, e.message)
+ self.info.id, type(e).__name__, str(e))
pass
if boards_played > 0:
self.info.running = -1 \
@@ -345,13 +345,13 @@ class MatchInfo:
except (IOError, TypeError, IndexError, KeyError) as e:
PlayoffLogger.get('matchinfo').warning(
'cannot determine running link from DB for match #%d: %s(%s)',
- self.info.id, type(e).__name__, e.message)
+ self.info.id, type(e).__name__, str(e))
try:
self.info.link = self.__get_html_running_link()
except (TypeError, IndexError, KeyError, IOError, ValueError) as e:
PlayoffLogger.get('matchinfo').warning(
'cannot determine running link from HTML for match #%d: %s(%s)',
- self.info.id, type(e).__name__, e.message)
+ self.info.id, type(e).__name__, str(e))
def set_phase_link(self, phase_link):
if self.info.link is None:
diff --git a/jfr_playoff/settings.py b/jfr_playoff/settings.py
index 181e19f..58de66c 100644
--- a/jfr_playoff/settings.py
+++ b/jfr_playoff/settings.py
@@ -35,7 +35,7 @@ class PlayoffSettings(object):
except Exception as e:
PlayoffLogger.get('settings').warning(
'unable to merge remote config %s: %s(%s)',
- remote_url, type(e).__name__, e.message)
+ remote_url, type(e).__name__, str(e))
return base_config
def load(self):
diff --git a/jfr_playoff/tournamentinfo.py b/jfr_playoff/tournamentinfo.py
index 24440b3..a646d4e 100644
--- a/jfr_playoff/tournamentinfo.py
+++ b/jfr_playoff/tournamentinfo.py
@@ -162,13 +162,13 @@ class TournamentInfo:
except (IOError, TypeError, IndexError, KeyError) as e:
PlayoffLogger.get('tournamentinfo').warning(
'cannot determine tournament results from DB: %s(%s)',
- type(e).__name__, e.message)
+ type(e).__name__, str(e))
try:
teams = self.__get_html_results()
except (TypeError, IndexError, KeyError, IOError, ValueError) as e:
PlayoffLogger.get('tournamentinfo').warning(
'cannot determine tournament results from HTML: %s(%s)',
- type(e).__name__, e.message)
+ type(e).__name__, str(e))
if self.is_finished() and 'final_positions' in self.settings:
PlayoffLogger.get('tournamentinfo').info(
'setting final positions from tournament results: %s',
@@ -184,13 +184,13 @@ class TournamentInfo:
except (IOError, TypeError, IndexError, KeyError) as e:
PlayoffLogger.get('tournamentinfo').warning(
'cannot determine tournament finished status from DB: %s(%s)',
- type(e).__name__, e.message)
+ type(e).__name__, str(e))
try:
return self.__get_html_finished()
except (TypeError, IndexError, KeyError, IOError, ValueError) as e:
PlayoffLogger.get('tournamentinfo').warning(
'cannot determine tournament finished status from HTML: %s(%s)',
- type(e).__name__, e.message)
+ type(e).__name__, str(e))
PlayoffLogger.get('tournamentinfo').info(
'assuming tournament is finished')
return True
@@ -201,11 +201,11 @@ class TournamentInfo:
except (IOError, TypeError, IndexError, KeyError) as e:
PlayoffLogger.get('tournamentinfo').warning(
'cannot determine tournament link from DB: %s(%s)',
- type(e).__name__, e.message)
+ type(e).__name__, str(e))
try:
return self.__get_html_link(suffix)
except (KeyError, ValueError):
PlayoffLogger.get('tournamentinfo').warning(
'cannot determine tournament link from HTML: %s(%s)',
- type(e).__name__, e.message)
+ type(e).__name__, str(e))
return None