def oswrite(self, fh, data): if self._writestate: return os.write(fh, data) else: raise OSError(errno.ENOSPC, "Faked Space problem")