summaryrefslogtreecommitdiffstats
path: root/ghetto_json
diff options
context:
space:
mode:
authorBryan Larsen <bryan@larsen.st>2017-11-01 11:35:15 -0400
committerGitHub <noreply@github.com>2017-11-01 11:35:15 -0400
commit8953d5d8e32a72905bce94aad9c2604c8247d74e (patch)
tree40c533683fe3a4fc8f98e1e76ba9e33c51eff74b /ghetto_json
parentd2830289f1c4863bfb2ab03919190d8811f1209f (diff)
downloadghetto-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`
Diffstat (limited to 'ghetto_json')
-rwxr-xr-xghetto_json2
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