Use aiofiles where relevant.

This commit is contained in:
grossmj committed 2019-03-06 23:00:01 +07:00
1 parent b0df7ecabf
commit af80b0bb6e
17 files changed
+90 -234

No files matched your search

+1 -1
View File
@@ -101,7 +101,7 @@ class Snapshot:
async with aiofiles.open(self.path, 'wb') as f:
async for chunk in zstream:
await f.write(chunk)
log.info("Snapshot '{}' created in {:.4f} seconds".format(self.path, time.time() - begin))
log.info("Snapshot '{}' created in {:.4f} seconds".format(self.name, time.time() - begin))
except (ValueError, OSError, RuntimeError) as e:
raise aiohttp.web.HTTPConflict(text="Could not create snapshot file '{}': {}".format(self.path, e))