Add an encoding parameter to open apkcache created with Py2

This commit is contained in:
Dmitriy Bogdanov 2016-04-08 22:09:49 +04:00
parent 4eb5fa88be
commit 3f75c95e5f

View file

@ -1208,7 +1208,7 @@ def main():
apkcachefile = os.path.join('tmp', 'apkcache') apkcachefile = os.path.join('tmp', 'apkcache')
if not options.clean and os.path.exists(apkcachefile): if not options.clean and os.path.exists(apkcachefile):
with open(apkcachefile, 'rb') as cf: with open(apkcachefile, 'rb') as cf:
apkcache = pickle.load(cf) apkcache = pickle.load(cf, encoding='utf-8')
else: else:
apkcache = {} apkcache = {}