remove obsolete files

lektura
max.mehl 2018-06-11 10:14:50 +02:00
parent f21e4d7dd7
commit 16e8a961f6
No known key found for this signature in database
GPG Key ID: 2704E4AB371E2E92
3 changed files with 0 additions and 25 deletions

3
.gitignore vendored
View File

@ -1,3 +0,0 @@
signatures.json
ips.json
spammer_*.json

View File

@ -1,22 +0,0 @@
#!/usr/bin/env python3
import json
import sys
injson = str(sys.argv[1])
outjson = str(sys.argv[2])
def remove_error_info(d):
if not isinstance(d, (dict, list)):
return d
if isinstance(d, list):
return [remove_error_info(v) for v in d]
return {k: remove_error_info(v) for k, v in d.items()
if k not in {'email', 'code', 'permPriv', 'permNews' }}
with open(injson) as json_data:
sigs_full = json.load(json_data)
sigs_clean = remove_error_info(sigs_full)
with open(outjson, 'w') as outfile:
json.dump(sigs_clean, outfile, indent=2)

View File