Use correct variable name
diff --git a/Lib/distutils/fancy_getopt.py b/Lib/distutils/fancy_getopt.py
index 6f8b8c0..83d0721 100644
--- a/Lib/distutils/fancy_getopt.py
+++ b/Lib/distutils/fancy_getopt.py
@@ -275,7 +275,7 @@
             if not self.takes_arg[opt]:     # boolean option?
                 if val != '':               # shouldn't have a value!
                     raise DistutilsInternalError, \
-                          "this can't happen: bad option value '%s'" % value
+                          "this can't happen: bad option value '%s'" % val
 
                 alias = self.negative_alias.get(opt)
                 if alias: