]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fix [ 1103844 ] fix distutils.install.dump_dirs() with negated options.
authorThomas Heller <theller@ctypes.org>
Thu, 20 Jan 2005 19:16:27 +0000 (19:16 +0000)
committerThomas Heller <theller@ctypes.org>
Thu, 20 Jan 2005 19:16:27 +0000 (19:16 +0000)
Backport from trunk.

Lib/distutils/command/install.py

index 5d5bdaa77efcf5287bed2bd430e7d91979a7b8f2..5831c71248a48908e2790ca3466bb67186f11e71 100644 (file)
@@ -356,8 +356,13 @@ class install (Command):
                 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)