update readme, replace useless json usage

master
Felix Pankratz 1 year ago
parent f38394d05a
commit 551e18f793

@ -23,6 +23,7 @@ positional arguments:
optional arguments: optional arguments:
-h, --help show this help message and exit -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 -b, --brief do not show detailed comparisons of mismatching values
-c, --color colorize the output -c, --color colorize the output
``` ```

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

Loading…
Cancel
Save