Merge pull request #157 from Birdi7/fixing-issue-138

Closes #138
This commit is contained in:
Alex Root Junior 2019-07-15 15:43:50 +03:00 committed by GitHub
commit bcfadca314
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -20,7 +20,8 @@ class _FileStorage(MemoryStorage):
pass pass
async def close(self): async def close(self):
self.write(self.path) if self.data:
self.write(self.path)
await super(_FileStorage, self).close() await super(_FileStorage, self).close()
def read(self, path: pathlib.Path): def read(self, path: pathlib.Path):