From 8c0f0c9211ac255264c089d7a5b2218ba41c1823 Mon Sep 17 00:00:00 2001 From: drew2a Date: Wed, 19 Jan 2022 12:10:59 +0100 Subject: [PATCH] Add warning message --- .../tribler_core/components/simple_storage/simple_storage.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/tribler-core/tribler_core/components/simple_storage/simple_storage.py b/src/tribler-core/tribler_core/components/simple_storage/simple_storage.py index 19d8e834044..ab55b322fbd 100644 --- a/src/tribler-core/tribler_core/components/simple_storage/simple_storage.py +++ b/src/tribler-core/tribler_core/components/simple_storage/simple_storage.py @@ -48,7 +48,8 @@ def load(self): self.logger.info(f'Loading storage from {self.path}') try: self.data = StorageData.parse_file(self.path) - except Exception: # pylint: disable=broad-except + except Exception as e: # pylint: disable=broad-except + self.logger.warning(e) self.logger.info('The storage file does not exist or corrupted. Create a new storage.') self.data = StorageData() self.logger.info(f'Loaded storage: {self.data}')