diff options
author | Bryan Newbold <bnewbold@archive.org> | 2020-03-05 01:10:14 -0800 |
---|---|---|
committer | Bryan Newbold <bnewbold@archive.org> | 2020-03-05 01:10:14 -0800 |
commit | 835d56cafb8f239c8a3ed4c253dfcaba95c6578f (patch) | |
tree | 380322141fdb1db265f6e34c7f185c056b8975da /python/scripts | |
parent | 5214a7397ee7f4f6e0624bc5ed2b8cb92b66c94f (diff) | |
download | sandcrawler-835d56cafb8f239c8a3ed4c253dfcaba95c6578f.tar.gz sandcrawler-835d56cafb8f239c8a3ed4c253dfcaba95c6578f.zip |
ingestrequest_row2json: skip on unicode errors
Diffstat (limited to 'python/scripts')
-rwxr-xr-x | python/scripts/ingestrequest_row2json.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/python/scripts/ingestrequest_row2json.py b/python/scripts/ingestrequest_row2json.py index 065dd3b..563855d 100755 --- a/python/scripts/ingestrequest_row2json.py +++ b/python/scripts/ingestrequest_row2json.py @@ -29,7 +29,10 @@ def run(args): for l in args.json_file: if not l.strip(): continue - req = transform(json.loads(l)) + try: + req = transform(json.loads(l)) + except: + print(l, file=sys.stderr) print(json.dumps(req, sort_keys=True)) def main(): |