X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/154870f0416b6b387637d6035c96321410512e95..7e113c61d336d677b96ff0ed55a5f81eb2b80d53:/src/lesmianator/models.py?ds=sidebyside diff --git a/src/lesmianator/models.py b/src/lesmianator/models.py index 0a4c0591b..47b431542 100644 --- a/src/lesmianator/models.py +++ b/src/lesmianator/models.py @@ -1,7 +1,7 @@ -# -*- coding: utf-8 -*- # This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later. # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. # +from functools import reduce import pickle from pickle import PickleError from datetime import datetime @@ -155,7 +155,7 @@ class Continuations(models.Model): obj = cls.objects.get(content_type=object_type, object_id=sth.id) if not obj.pickle: raise cls.DoesNotExist - f = open(obj.pickle.path) + f = open(obj.pickle.path, 'rb') keys, conts = pickle.load(f) f.close() if set(keys) != should_keys: