Skip to content

Commit

Permalink
Fixing unresolved references (#1550)
Browse files Browse the repository at this point in the history
  • Loading branch information
ratoaq2 authored and medariox committed Nov 15, 2016
1 parent 98011f0 commit 32ca6ae
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
6 changes: 3 additions & 3 deletions medusa/name_parser/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,12 +109,12 @@ def _parse_string(self, name):
season_number = int(tv_episode['seasonnumber'])
episode_numbers = [int(tv_episode['episodenumber'])]
logger.debug('Indexer info for show {name}: {ep}',
name=result.show.name, ep=episode_num(season_number, episode_numbers))
except app.indexer_episodenotfound:
name=result.show.name, ep=episode_num(season_number, episode_numbers[0]))
except app.IndexerEpisodeNotFound:
logger.warn("Unable to find episode with date {date} for show '{name}'. Skipping",
date=result.air_date, name=result.show.name)
episode_numbers = []
except app.indexer_error as e:
except app.IndexerError as e:
logger.warn('Unable to contact {indexer_api.name}: {ex!r}', indexer_api=indexer_api, ex=e)
episode_numbers = []

Expand Down
2 changes: 0 additions & 2 deletions medusa/post_processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,6 @@ def _log(self, message, level=logger.INFO):
def _get_rel_path(self):
"""Return the relative path to the file if possible, else the parent dir.
:param file_path: path to the file
:type file_path: text_type
:return: relative path to file or parent dir to file
:rtype: text_type
"""
Expand Down
4 changes: 2 additions & 2 deletions medusa/server/api/v1/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -1614,7 +1614,7 @@ def run(self):

try:
api_data = t[str(self.name).encode()]
except (app.IndexerShowNotFound, app.indexer_showincomplete, app.IndexerError):
except (app.IndexerShowNotFound, app.IndexerShowIncomplete, app.IndexerError):
logger.log(u"API :: Unable to find show with id " + str(self.indexerid), logger.WARNING)
continue

Expand All @@ -1639,7 +1639,7 @@ def run(self):

try:
my_show = t[int(self.indexerid)]
except (app.IndexerShowNotFound, app.indexer_showincomplete, app.IndexerError):
except (app.IndexerShowNotFound, app.IndexerShowIncomplete, app.IndexerError):
logger.log(u"API :: Unable to find show with id " + str(self.indexerid), logger.WARNING)
return _responds(RESULT_SUCCESS, {"results": [], "langid": lang_id})

Expand Down

0 comments on commit 32ca6ae

Please sign in to comment.