refactoring

This commit is contained in:
Maxim Devaev
2022-07-23 11:17:36 +03:00
parent baeb2bc35b
commit de14053725
3 changed files with 20 additions and 23 deletions

View File

@@ -388,13 +388,8 @@ class Plugin(BaseMsd): # pylint: disable=too-many-instance-attributes
# =====
async def __close_writer(self) -> None:
try:
if self.__writer:
get_logger().info("Closing new image file ...")
await self.__writer.close()
except Exception:
get_logger().exception("Can't close image file")
finally:
if self.__writer:
await self.__writer.close()
self.__writer = None
# =====