Author: Stefano Rivera <[email protected]>
Branch: 
Changeset: r71731:eacab5168076
Date: 2014-05-26 01:07 +0200
http://bitbucket.org/pypy/pypy/changeset/eacab5168076/

Log:    Raise ProcessorAutodetectError for unknown machine names

        Previously this function was only used for the JIT, so it only had
        to support machines that the JIT supports. Now, it's used by
        rpython.rlib.rawstorage, and should raise an appropriate exception,
        rather than KeyError, on unknown machines.

diff --git a/rpython/jit/backend/detect_cpu.py 
b/rpython/jit/backend/detect_cpu.py
--- a/rpython/jit/backend/detect_cpu.py
+++ b/rpython/jit/backend/detect_cpu.py
@@ -63,7 +63,10 @@
             'AMD64': MODEL_X86,    # win64
             'armv7l': MODEL_ARM,
             'armv6l': MODEL_ARM,
-            }[mach]
+            }.get(mach)
+
+    if result is None:
+        raise ProcessorAutodetectError, "unknown machine name %s" % mach
     #
     if result.startswith('x86'):
         if sys.maxint == 2**63-1:
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to