Skip to content

Commit

Permalink
more reliable way to find progress bar position in log file
Browse files Browse the repository at this point in the history
  • Loading branch information
ChemicalXandco committed Nov 25, 2019
1 parent 17ecf78 commit 749fc15
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions meshroom/core/node.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,10 +182,13 @@ def makeProgressBar(self, end, message=''):
f.write(message+'\n')
f.write('0% 10 20 30 40 50 60 70 80 90 100%\n')
f.write('|----|----|----|----|----|----|----|----|----|----|\n\n')
if message:
self.progressBarPosition = f.tell()-14
else:
self.progressBarPosition = f.tell()-7

f.close()

with open(self.chunk.logFile, 'r') as f:
content = f.read()
self.progressBarPosition = content.rfind('\n')

f.close()

def updateProgressBar(self, value):
Expand Down

0 comments on commit 749fc15

Please sign in to comment.