[Python-checkins] distutils2: Branch merge

tarek.ziade python-checkins at python.org
Wed Oct 13 16:58:53 CEST 2010


tarek.ziade pushed c77de166761b to distutils2:

http://hg.python.org/distutils2/rev/c77de166761b
changeset:   769:c77de166761b
parent:      768:0857fb303589
parent:      763:5cefa438a1fc
user:        ?ric Araujo <merwok at netwok.org>
date:        Mon Oct 11 16:50:20 2010 +0200
summary:     Branch merge
files:       

diff --git a/distutils2/dist.py b/distutils2/dist.py
--- a/distutils2/dist.py
+++ b/distutils2/dist.py
@@ -425,9 +425,11 @@
 
         # Require that the command class be derived from Command -- want
         # to be sure that the basic "command" interface is implemented.
-        if not issubclass(cmd_class, Command):
+        for meth in ('initialize_options', 'finalize_options', 'run'):
+            if hasattr(cmd_class, meth):
+                continue
             raise DistutilsClassError(
-                  "command class %s must subclass Command" % cmd_class)
+                  'command "%s" must implement "%s"' % (cmd_class. meth))
 
         # Also make sure that the command object provides a list of its
         # known options.

--
Repository URL: http://hg.python.org/distutils2


More information about the Python-checkins mailing list