From 24f2b6cd6772086102c65d7318e8168933cfdffd Mon Sep 17 00:00:00 2001 From: Donaldson Date: Fri, 2 Aug 2019 18:26:43 -0500 Subject: [PATCH] Handling exceptions appropriately --- devel/moth.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/devel/moth.py b/devel/moth.py index adf27fe..ecf16c4 100644 --- a/devel/moth.py +++ b/devel/moth.py @@ -85,7 +85,7 @@ class PuzzleSuccess(dict): if attr in self.valid_fields: self[attr] = value else: - raise AttributeError() + raise AttributeError("'%s' object has no attribute '%s'" % (type(self).__name__, attr)) class Puzzle: