update readme, replace useless json usage

This commit is contained in:
Felix Pankratz 2023-07-02 19:34:46 +02:00
parent f38394d05a
commit 551e18f793
2 changed files with 5 additions and 4 deletions

View File

@ -23,6 +23,7 @@ positional arguments:
optional arguments:
-h, --help show this help message and exit
-r, --recursive recursively check all dependencies for mismatches
-b, --brief do not show detailed comparisons of mismatching values
-c, --color colorize the output
```

View File

@ -58,11 +58,11 @@ def parse_manifest(pkg):
try:
dependencies = latest_manifest['dependencies']
except KeyError:
dependencies = json.loads('{}')
dependencies = {}
try:
scripts = latest_manifest['scripts']
except KeyError:
scripts = json.loads('{}')
scripts = {}
name = latest_manifest['name']
return Manifest(name, latest_ver, dependencies, scripts)
@ -96,11 +96,11 @@ def parse_actual_manifest(pkg, ver):
try:
dependencies = manifest['dependencies']
except KeyError:
dependencies = json.loads('{}')
dependencies = {}
try:
scripts = manifest['scripts']
except KeyError:
scripts = json.loads('{}')
scripts = {}
name = manifest['name']
return Manifest(name, version, dependencies, scripts)