Commit 2817decc authored by Rashad Kanavath's avatar Rashad Kanavath
Browse files

fix progress bar update for running apps

parent dafe39b3
......@@ -91,20 +91,18 @@ def executeOtb(commands, feedback, addToLog=True):
) as proc:
try:
for line in iter(proc.stdout.readline, ''):
line = line.strip()
if 'Writing' in line:
perc = line.split(':')[1]
perc = perc.split('%')[0]
s = ''.join([x for x in perc[1] if x.isdigit()])
part = line.split(':')[1]
percent = part.split('%')[0]
try:
if int(s) >= 100:
feedback.pushConsoleInfo(line)
feedback.setProgress(int(s))
if int(percent) >= 100:
loglines.append(line)
feedback.setProgress(int(percent))
except:
pass
else:
line = line.strip()
if line != '/' and line != '-' and line != '\\' and line != '|':
loglines.append(line)
loglines.append(line)
except BaseException as e:
loglines.append(str(e))
pass
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment