Revert "More racecondition elimination."

This reverts commit d846522e0e.
This commit is contained in:
Markus Unterwaditzer 2014-04-10 13:36:02 +02:00
parent d846522e0e
commit 91c3114b78

View file

@ -119,7 +119,7 @@ class FilesystemStorage(Storage):
raise exceptions.AlreadyExistingError(item.uid)
with safe_write(fpath, 'wb+') as f:
f.write(item.raw.encode(self.encoding))
return href, _get_etag(f.tmppath)
return href, _get_etag(fpath)
def update(self, href, item, etag):
fpath = self._get_filepath(href)
@ -134,7 +134,7 @@ class FilesystemStorage(Storage):
with safe_write(fpath, 'wb') as f:
f.write(item.raw.encode(self.encoding))
return _get_etag(f.tmppath)
return _get_etag(fpath)
def delete(self, href, etag):
fpath = self._get_filepath(href)