summaryrefslogtreecommitdiffstats
path: root/Lib/distutils
diff options
context:
space:
mode:
authorGreg Ward <gward@python.net>2000-03-18 17:35:12 (GMT)
committerGreg Ward <gward@python.net>2000-03-18 17:35:12 (GMT)
commit89ccb984f013a3ad5664982189b8d29e944f1375 (patch)
tree681b54bab4718285a777adcb0ca35a9f4d2dac54 /Lib/distutils
parent11fc7e447cb7c921f6256847478333e530669f4d (diff)
downloadcpython-89ccb984f013a3ad5664982189b8d29e944f1375.zip
cpython-89ccb984f013a3ad5664982189b8d29e944f1375.tar.gz
cpython-89ccb984f013a3ad5664982189b8d29e944f1375.tar.bz2
Oops! Don't call 'ensure_ready()' in 'Distribution.find_command_obj()' --
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.
Diffstat (limited to 'Lib/distutils')
-rw-r--r--Lib/distutils/core.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/Lib/distutils/core.py b/Lib/distutils/core.py
index a31e60c..dfe411b 100644
--- a/Lib/distutils/core.py
+++ b/Lib/distutils/core.py
@@ -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):