diff options
author | Bryan Larsen <bryan@larsen.st> | 2017-11-01 11:35:15 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-01 11:35:15 -0400 |
commit | 8953d5d8e32a72905bce94aad9c2604c8247d74e (patch) | |
tree | 40c533683fe3a4fc8f98e1e76ba9e33c51eff74b | |
parent | d2830289f1c4863bfb2ab03919190d8811f1209f (diff) | |
download | ghetto-json-8953d5d8e32a72905bce94aad9c2604c8247d74e.tar.gz ghetto-json-8953d5d8e32a72905bce94aad9c2604c8247d74e.tar.bz2 ghetto-json-8953d5d8e32a72905bce94aad9c2604c8247d74e.tar.xz ghetto-json-8953d5d8e32a72905bce94aad9c2604c8247d74e.zip |
Fix crash when value contains `=`
If the value contains an equal sign (`=`), we get a crash
`ValueError: dictionary update sequence element #3 has length 3; 2 is required`
-rwxr-xr-x | ghetto_json | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ghetto_json b/ghetto_json index 8d9e5bd..ebc3d51 100755 --- a/ghetto_json +++ b/ghetto_json @@ -11,7 +11,7 @@ except ImportError: json_load = json.load def main(params_list): - params = dict(x.split("=", 2) for x in params_list) + params = dict(x.split("=", 1) for x in params_list) path = params.pop('path') changed = False |