Armin Rigo committed a6dcef2

Bah. Try to fix translation on non-OSX platforms.

Comments (0)

Files changed (2)


 from pypy.interpreter.typedef import TypeDef
 from pypy.interpreter.gateway import interp2app, unwrap_spec, NoneNotWrapped
 from pypy.rlib import rmmap
-from pypy.rlib.rmmap import RValueError, RTypeError, ROverflowError, RSystemError
+from pypy.rlib.rmmap import RValueError, RTypeError, ROverflowError
 import sys
 import os
 import platform
         except OSError, e:
             raise mmap_error(, e)
-        except RSystemError, e:
+        except RValueError, e:
+            # obscure: in this case, RValueError translates to an app-level
+            # SystemError.
             raise OperationError(,


     def __init__(self, message):
         self.message = message
-class RSystemError(Exception):
-    def __init__(self, message):
-        self.message = message
 includes = ["sys/types.h"]
 if _POSIX:
     includes += ['unistd.h', 'sys/mman.h']
         if _POSIX:
             if not has_mremap:
-                raise RSystemError("mmap: resizing not available--no mremap()")
+                raise RValueError("mmap: resizing not available--no mremap()")
             # resize the underlying file first
             os.ftruncate(self.fd, self.offset + newsize)