commit d3eefefed408a8bb8c6830054339525a4f7d6b31 parent 05ebd0f5b223a7e39eb1b1c0bb3ac949c061cec9 Author: SomberNight <somber.night@protonmail.com> Date: Wed, 7 Oct 2020 20:39:00 +0200 simplify prev Diffstat:
M | electrum/storage.py | | | 6 | ++---- |
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/electrum/storage.py b/electrum/storage.py @@ -87,12 +87,10 @@ class WalletStorage(Logger): f.flush() os.fsync(f.fileno()) - default_mode = stat.S_IREAD | stat.S_IWRITE try: - mode = os.stat(self.path).st_mode if self.file_exists() else default_mode + mode = os.stat(self.path).st_mode except FileNotFoundError: - # user might have deleted/renamed file while running - mode = default_mode + mode = stat.S_IREAD | stat.S_IWRITE # assert that wallet file does not exist, to prevent wallet corruption (see issue #5082) if not self.file_exists():