projects
/
python
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
77751c0
)
Fix 'get_command_obj()' so it checks if a command object has an attribute
author
Greg Ward
<gward@python.net>
Tue, 23 May 2000 04:11:14 +0000
(
04:11
+0000)
committer
Greg Ward
<gward@python.net>
Tue, 23 May 2000 04:11:14 +0000
(
04:11
+0000)
before setting it -- this will catch bad options (eg. typos) in config files.
Lib/distutils/dist.py
patch
|
blob
|
history
diff --git
a/Lib/distutils/dist.py
b/Lib/distutils/dist.py
index 3ceadf1985d184935e09bc8b2c69ff0ef6b13e82..7bdd9aa09b6ce879fb49e05a00e28412db028016 100644
(file)
--- 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