diff options
author | Trupti Rajesh Kini | 2016-10-25 15:22:44 +0530 |
---|---|---|
committer | GitHub | 2016-10-25 15:22:44 +0530 |
commit | efe99ed44bdd8a2568862967577d7ccea41024d5 (patch) | |
tree | 4c26ad501f9387e3d16c389603ae1432bd2c64fd /scripts/split_json.py | |
parent | 6da84d8c334e16ebea6597d8b83d51552935ed00 (diff) | |
parent | 27d47a26dd9c7765bbfda112eddbebe8f3679460 (diff) | |
download | Python-TBC-Interface-efe99ed44bdd8a2568862967577d7ccea41024d5.tar.gz Python-TBC-Interface-efe99ed44bdd8a2568862967577d7ccea41024d5.tar.bz2 Python-TBC-Interface-efe99ed44bdd8a2568862967577d7ccea41024d5.zip |
Merge pull request #41 from kinitrupti/master
Upgraded to python3
Diffstat (limited to 'scripts/split_json.py')
-rw-r--r-- | scripts/split_json.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/scripts/split_json.py b/scripts/split_json.py index baa0b90..a6905db 100644 --- a/scripts/split_json.py +++ b/scripts/split_json.py @@ -1,4 +1,4 @@ -import cPickle +import pickle import json from os.path import dirname, abspath,join try: @@ -7,14 +7,14 @@ try: json_dump.close() a = [saved_data for saved_data in json_data if str(saved_data).startswith("{u'ch")] with open(join(dirname(abspath(dirname(__file__))),'tbc_error_page/error.pickle'), "w+") as error_json: - cPickle.dump(a, error_json) + pickle.dump(a, error_json) error_json.close() b = [saved_data for saved_data in json_data if str(saved_data).startswith("{u'br")] with open(join(dirname(abspath(dirname(__file__))),'tbc_error_page/broken.pickle'), "w+") as broken_json: - cPickle.dump(b, broken_json) + pickle.dump(b, broken_json) broken_json.close() except ValueError: - print "Couldn't find file" + print("Couldn't find file") |