diff options
author | TerryHowe <terrylhowe@gmail.com> | 2015-09-01 11:19:01 -0600 |
---|---|---|
committer | TerryHowe <terrylhowe@gmail.com> | 2015-09-01 11:20:13 -0600 |
commit | 7beda7dafd77c15709c4d8bfd6e30b447018d384 (patch) | |
tree | 53f4f4857fd3ed9d7d0d1c4ed498b0f55991ab13 | |
parent | 86d988d56fa29fe4d467874868e5e09ad9a4780d (diff) | |
download | python-designateclient-7beda7dafd77c15709c4d8bfd6e30b447018d384.tar.gz |
Make is so exceptions have some message
If you don't have a message on an exception it prints out as
nothing. This change will default the messaqge to the class
name which should be useful.
Change-Id: Ie246b37c971e8c30752714b49aa55e69482b32e7
-rw-r--r-- | designateclient/exceptions.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/designateclient/exceptions.py b/designateclient/exceptions.py index 6d4175b..9021929 100644 --- a/designateclient/exceptions.py +++ b/designateclient/exceptions.py @@ -16,7 +16,10 @@ class Base(Exception): - pass + def __init__(self, message=None): + if not message: + message = self.__class__.__name__ + super(Base, self).__init__(message) class UnsupportedVersion(Base): |