From 94d83883828632345388277fe441d5b243ac8f1e Mon Sep 17 00:00:00 2001 From: Julian Daube Date: Tue, 2 Jul 2019 14:49:58 +0200 Subject: [PATCH] reader: satisfy progress interface --- gds/reader.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gds/reader.py b/gds/reader.py index 9cd9946..ff7a538 100644 --- a/gds/reader.py +++ b/gds/reader.py @@ -27,12 +27,16 @@ class Reader(ProgressGetter): return self.current / self.total + @property + def total(self): + return self._total + def __init__(self, file): self.stream = file # find file size self.stream.seek(0, 2) - self.total = self.stream.tell() + self._total = self.stream.tell() self.stream.seek(0, 0) def skip(self, n):