'Called for low-level os.open()'

def open(self, file, flags, mode=511, *args, **kw):

    if ((flags & WRITE_FLAGS) and (not self._ok(file))):
        self._violation('os.open', file, flags, mode, *args, **kw)
    return _os.open(file, flags, mode, *args, **kw)
