Adding subreddit name to a few error messages.

This commit is contained in:
Michael Lazar
2016-10-17 17:43:10 -07:00
parent de9edd1ce0
commit 9675fb4ba4
4 changed files with 15 additions and 5 deletions

View File

@@ -22,8 +22,13 @@ class SubmissionError(RTVError):
"Submission could not be loaded"
class SubredditError(RTVError):
"Subreddit could not be reached"
class NoSubmissionsError(RTVError):
"No submissions for the given page"
def __init__(self, name):
self.name = name
message = '`{0}` has no submissions'.format(name)
super(NoSubmissionsError, self).__init__(message)
class SubscriptionError(RTVError):