diff --git a/rtv/mime_parsers.py b/rtv/mime_parsers.py index dcac6bf..f9005f7 100644 --- a/rtv/mime_parsers.py +++ b/rtv/mime_parsers.py @@ -64,8 +64,8 @@ class YoutubeMIMEParser(BaseMIMEParser): Assign a custom mime-type so they can be referenced in mailcap. """ pattern = re.compile( - r'(?:https?://)?(m\.)?(?:youtu\.be/|(?:www\.)?youtube\.com/watch' - r'(?:\.php)?\'?.*v=)([a-zA-Z0-9\-_]+)') + r'(?:https?://)?(m\.)?(?:youtu\.be/|(?:www\.)?youtube\.com/watch' + r'(?:\.php)?\'?.*v=)([a-zA-Z0-9\-_]+)') @staticmethod def get_mimetype(url): diff --git a/rtv/objects.py b/rtv/objects.py index 8317cb8..3020a42 100644 --- a/rtv/objects.py +++ b/rtv/objects.py @@ -190,7 +190,7 @@ class LoadScreen(object): self.exception = e exc_name = type(e).__name__ - _logger.info('Loader caught: {0} - {1}'.format(exc_name, e)) + _logger.info('Loader caught: %s - %s', exc_name, e) if isinstance(e, KeyboardInterrupt): # Don't need to print anything for this one, just swallow it diff --git a/rtv/subreddit.py b/rtv/subreddit.py index 24f46a1..aa203b0 100644 --- a/rtv/subreddit.py +++ b/rtv/subreddit.py @@ -81,7 +81,7 @@ class SubredditPage(Page): If this was pressed on the front page, go back to the last subreddit. """ - if not self.content.name == '/r/front': + if self.content.name != '/r/front': target = '/r/front' self._toggled_subreddit = self.content.name else: