Don't read upgrade progress file if size hasn't changed
apparently that is possible sometimes? or perhaps just an issue on python 3?
This commit is contained in:
parent
4c2f1aa4ed
commit
6febd01e76
1 changed files with 7 additions and 6 deletions
|
@ -343,6 +343,7 @@ class UpgradeView(MasterView):
|
||||||
offset = session.get('stdout.offset', 0)
|
offset = session.get('stdout.offset', 0)
|
||||||
if os.path.exists(path):
|
if os.path.exists(path):
|
||||||
size = os.path.getsize(path) - offset
|
size = os.path.getsize(path) - offset
|
||||||
|
if size:
|
||||||
with open(path, 'rb') as f:
|
with open(path, 'rb') as f:
|
||||||
f.seek(offset)
|
f.seek(offset)
|
||||||
chunk = f.read(size)
|
chunk = f.read(size)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue