mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-02-02 11:01:53 +08:00
sync
This commit is contained in:
@@ -396,9 +396,10 @@ class Plugin(BaseMsd): # pylint: disable=too-many-instance-attributes
|
|||||||
try:
|
try:
|
||||||
if self.__new_file:
|
if self.__new_file:
|
||||||
get_logger().info("Closing new image file ...")
|
get_logger().info("Closing new image file ...")
|
||||||
|
await aiofs.afile_sync(self.__new_file)
|
||||||
await self.__new_file.close() # type: ignore
|
await self.__new_file.close() # type: ignore
|
||||||
except Exception:
|
except Exception:
|
||||||
get_logger().exception("Can't close device file")
|
get_logger().exception("Can't close image file")
|
||||||
finally:
|
finally:
|
||||||
self.__new_file = None
|
self.__new_file = None
|
||||||
self.__new_file_written = 0
|
self.__new_file_written = 0
|
||||||
|
|||||||
@@ -275,6 +275,7 @@ class Plugin(BaseMsd): # pylint: disable=too-many-instance-attributes
|
|||||||
try:
|
try:
|
||||||
if self.__device_file:
|
if self.__device_file:
|
||||||
get_logger().info("Closing device file ...")
|
get_logger().info("Closing device file ...")
|
||||||
|
await aiofs.afile_sync(self.__device_file)
|
||||||
await self.__device_file.close() # type: ignore
|
await self.__device_file.close() # type: ignore
|
||||||
except Exception:
|
except Exception:
|
||||||
get_logger().exception("Can't close device file")
|
get_logger().exception("Can't close device file")
|
||||||
|
|||||||
Reference in New Issue
Block a user