Bugfixes JSONDecodeError empty file

This commit is contained in:
Dimitris Zlatanidis 2024-04-01 10:14:50 +03:00
parent 68941e2c72
commit da4ec2b433
2 changed files with 6 additions and 1 deletions

View file

@ -1,9 +1,12 @@
## slpkg - ChangeLog
### 5.0.3 - 31/03/2024
### 5.0.3 - 01/04/2024
- Updated:
* Updated for slpkg_new-configs and (D)iff command (Thanks to Marav)
- Bugfixes:
* JSONDecodeError: Expecting value: line 1 column 1 (char 0) (Thanks to Marav)
### 5.0.2 - 30/03/2024
- Updated:
* Updated for coding style

View file

@ -196,6 +196,8 @@ class Utilities(Configs):
json_data: dict = json.loads(file.read_text(encoding='utf-8'))
except FileNotFoundError:
self.errors.raise_error_message(f'{file} not found.', exit_status=1)
except json.decoder.JSONDecodeError:
pass
return json_data
def ignore_packages(self, packages: list) -> list: