diff options
author | Éric Araujo <merwok@netwok.org> | 2011-07-29 00:32:41 (GMT) |
---|---|---|
committer | Éric Araujo <merwok@netwok.org> | 2011-07-29 00:32:41 (GMT) |
commit | 7b0908a8e444d735d459bac7c32566f6f11882fe (patch) | |
tree | 13d9f1c0d4aae1ad3b0acf8a909e9b69bada5dc0 /Lib/packaging/command | |
parent | 943006bf68825ea007a1941f8afb09d202868988 (diff) | |
download | cpython-7b0908a8e444d735d459bac7c32566f6f11882fe.zip cpython-7b0908a8e444d735d459bac7c32566f6f11882fe.tar.gz cpython-7b0908a8e444d735d459bac7c32566f6f11882fe.tar.bz2 |
Make TypeError message from Command.__init__ more useful
Diffstat (limited to 'Lib/packaging/command')
-rw-r--r-- | Lib/packaging/command/cmd.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/packaging/command/cmd.py b/Lib/packaging/command/cmd.py index fa56aa6..1053ac3 100644 --- a/Lib/packaging/command/cmd.py +++ b/Lib/packaging/command/cmd.py @@ -57,7 +57,8 @@ class Command: from packaging.dist import Distribution if not isinstance(dist, Distribution): - raise TypeError("dist must be a Distribution instance") + raise TypeError("dist must be an instance of Distribution, not %r" + % type(dist)) if self.__class__ is Command: raise RuntimeError("Command is an abstract class") |