diff options
-rw-r--r-- | Lib/distutils/dist.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/distutils/dist.py b/Lib/distutils/dist.py index 3ceadf1..7bdd9aa 100644 --- a/Lib/distutils/dist.py +++ b/Lib/distutils/dist.py @@ -627,6 +627,10 @@ class Distribution: print " setting options:" for (option, (source, value)) in options.items(): print " %s = %s (from %s)" % (option, value, source) + if not hasattr(cmd_obj, option): + raise DistutilsOptionError, \ + ("%s: command '%s' has no such option '%s'") % \ + (source, command, option) setattr(cmd_obj, option, value) return cmd_obj |