Mercurial > cpython-lru_cache-weakref
diff Lib/packaging/command/cmd.py @ 71573:b788eaff72bc
Make TypeError message from Command.__init__ more useful
| author | Éric Araujo <merwok@netwok.org> |
|---|---|
| date | Fri, 29 Jul 2011 02:32:41 +0200 |
| parents | 1a31c3be88b1 |
| children | 540e278ab646 |
line wrap: on
line diff
--- a/Lib/packaging/command/cmd.py Fri Jul 29 02:31:39 2011 +0200 +++ b/Lib/packaging/command/cmd.py Fri Jul 29 02:32:41 2011 +0200 @@ -57,7 +57,8 @@ 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")
