]> granicus.if.org Git - python/commitdiff
Don't use 'set_option()' or 'get_option()' method -- direct attribute access,
authorGreg Ward <gward@python.net>
Sun, 7 May 2000 15:32:13 +0000 (15:32 +0000)
committerGreg Ward <gward@python.net>
Sun, 7 May 2000 15:32:13 +0000 (15:32 +0000)
or getattr/setattr, is all that's needed.

Lib/distutils/command/bdist.py
Lib/distutils/command/install_lib.py

index cde8dd63e82f99cc504498d858c0d731a26d3868..01b4e162d3668f1686e9eb23b9fa2488ebc324b2 100644 (file)
@@ -64,7 +64,7 @@ class bdist (Command):
                   "invalid archive format '%s'" % self.format
 
         sub_cmd = self.find_peer (cmd_name)
-        sub_cmd.set_option ('format', self.format)
+        sub_cmd.format = self.format
         self.run_peer (cmd_name)
 
     # run()
index 5740c5eed2f5fdb912be46988e66e77e03142fe8..852e3f63a2cbc3e302cca39b58b500ac0a380b21 100644 (file)
@@ -79,7 +79,7 @@ class install_lib (Command):
 
         build_cmd = self.find_peer (build_cmd)
         build_files = build_cmd.get_outputs()
-        build_dir = build_cmd.get_option (cmd_option)
+        build_dir = getattr (build_cmd, cmd_option)
 
         prefix_len = len (build_dir) + len (os.sep)
         outputs = []