Fix how we check file size when reading stdout for upgrade
i guess sometimes we were getting a negative number there
This commit is contained in:
parent
45f19517d3
commit
d3e67ccbcd
|
@ -343,7 +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:
|
if size > 0:
|
||||||
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…
Reference in a new issue