diff Lib/distutils/command/install.py @ 34472:0f41fe3fadf4 2.4

Fix [ 1103844 ] fix distutils.install.dump_dirs() with negated options. Backport from trunk.
author Thomas Heller <theller@ctypes.org>
date Thu, 20 Jan 2005 19:15:39 +0000
parents 893d46576737
children 93344da76acd
line wrap: on
line diff
--- a/Lib/distutils/command/install.py	Wed Jan 19 17:25:05 2005 +0000
+++ b/Lib/distutils/command/install.py	Thu Jan 20 19:15:39 2005 +0000
@@ -352,8 +352,13 @@
                 opt_name = opt[0]
                 if opt_name[-1] == "=":
                     opt_name = opt_name[0:-1]
-                opt_name = string.translate(opt_name, longopt_xlate)
-                val = getattr(self, opt_name)
+                if self.negative_opt.has_key(opt_name):
+                    opt_name = string.translate(self.negative_opt[opt_name],
+                                                longopt_xlate)
+                    val = not getattr(self, opt_name)
+                else:
+                    opt_name = string.translate(opt_name, longopt_xlate)
+                    val = getattr(self, opt_name)
                 print "  %s: %s" % (opt_name, val)