Author: Armin Rigo <[email protected]>
Branch: 
Changeset: r44540:46ab4f9f3876
Date: 2011-05-27 11:43 +0200
http://bitbucket.org/pypy/pypy/changeset/46ab4f9f3876/

Log:    make --help work even without --opt=. Thanks nekto0n.

diff --git a/pypy/translator/goal/targetpypystandalone.py 
b/pypy/translator/goal/targetpypystandalone.py
--- a/pypy/translator/goal/targetpypystandalone.py
+++ b/pypy/translator/goal/targetpypystandalone.py
@@ -105,7 +105,8 @@
         return parser
 
     def handle_config(self, config, translateconfig):
-        if translateconfig._cfgimpl_value_owners['opt'] == 'default':
+        if (not translateconfig.help and
+            translateconfig._cfgimpl_value_owners['opt'] == 'default'):
             raise Exception("You have to specify the --opt level.\n"
                     "Try --opt=2 or --opt=jit, or equivalently -O2 or -Ojit .")
         self.translateconfig = translateconfig
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to