summaryrefslogtreecommitdiffstats
path: root/Lib/packaging/command
diff options
context:
space:
mode:
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)
commit7b0908a8e444d735d459bac7c32566f6f11882fe (patch)
tree13d9f1c0d4aae1ad3b0acf8a909e9b69bada5dc0 /Lib/packaging/command
parent943006bf68825ea007a1941f8afb09d202868988 (diff)
downloadcpython-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.py3
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")