]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Oops! Don't call 'ensure_ready()' in 'Distribution.find_command_obj()' --
authorGreg Ward <gward@python.net>
Sat, 18 Mar 2000 17:35:12 +0000 (17:35 +0000)
committerGreg Ward <gward@python.net>
Sat, 18 Mar 2000 17:35:12 +0000 (17:35 +0000)
that broke parsing command-line options.  Instead call it in
'Command.find_peer()', which is why I added it to 'find_command_obj()'
in the first place.

Lib/distutils/core.py

index a31e60ce4a73072f3094beeab21d0782a07d3eba..dfe411b0ccd7bcebd95f3d1284c1c7de83104b06 100644 (file)
@@ -506,7 +506,6 @@ class Distribution:
         cmd_obj = self.command_obj.get (command)
         if not cmd_obj and create:
             cmd_obj = self.create_command_obj (command)
-            cmd_obj.ensure_ready ()
             self.command_obj[command] = cmd_obj
 
         return cmd_obj
@@ -873,7 +872,9 @@ class Command:
            find (create if necessary and 'create' is true) the command
            object for 'command'.."""
 
-        return self.distribution.find_command_obj (command, create)
+        cmd_obj = self.distribution.find_command_obj (command, create)
+        cmd_obj.ensure_ready ()
+        return cmd_obj
 
 
     def get_peer_option (self, command, option):