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:
Lance Edgar 2018-07-02 12:06:09 -05:00
parent 4c2f1aa4ed
commit 6febd01e76

View file

@ -343,6 +343,7 @@ class UpgradeView(MasterView):
offset = session.get('stdout.offset', 0)
if os.path.exists(path):
size = os.path.getsize(path) - offset
if size:
with open(path, 'rb') as f:
f.seek(offset)
chunk = f.read(size)