[pypy-svn] r55420 - pypy/dist/pypy/config
arigo at codespeak.net
arigo at codespeak.net
Fri May 30 14:03:40 CEST 2008
Author: arigo
Date: Fri May 30 14:03:39 2008
New Revision: 55420
Modified:
pypy/dist/pypy/config/config.py
Log:
Print the pending warnings before exiting translate.py
via an optparse.OptionValueError.
Modified: pypy/dist/pypy/config/config.py
==============================================================================
--- pypy/dist/pypy/config/config.py (original)
+++ pypy/dist/pypy/config/config.py Fri May 30 14:03:39 2008
@@ -520,6 +520,12 @@
value = self.convert_from_cmdline(value)
self.config.setoption(self.option._name, value, who='cmdline')
except ConfigError, e:
+ # This OptionValueError is going to exit the translate.py process.
+ # Now is the last chance to print the warnings, which might give
+ # more information... hack.
+ import sys
+ for warning in self.config.get_warnings():
+ print >> sys.stderr, warning
raise optparse.OptionValueError(e.args[0])
def help_default(self):
More information about the Pypy-commit
mailing list