def _write(self):
        with self.lock:
            try:
                with open(unicode('%s/%s.yaml' % (self.path, self.user.username)), 'w') as f:
                    yaml.dump(self.user_items, f, default_flow_style=False)
            except IOError as e:
                LOG.error('Failed writing store items file "%s": %s', self.path, str(e))
                raise StoreError('Failed writing store items file %s' % self.path)
dataset/ETHPy150Open turbulenz/turbulenz_local/turbulenz_local/models/apiv1/store.py/StoreUserGameItems._write/original