Commit 7b0908a8 authored by Éric Araujo's avatar Éric Araujo

Make TypeError message from Command.__init__ more useful

parent 943006bf
......@@ -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")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment