modified: ri_oper.py

change step ---> current_step
This commit is contained in:
fling
2010-10-15 13:18:05 +08:00
parent 34058ac5da
commit c16bdb61d9

View File

@@ -46,7 +46,7 @@ class Operation:
return_value - shell script return value
score - an abstract value, for example score is 5,
steps - the subprocess of the number of runs
step - the subprocess run one time
current_step - the subprocess run one time
total is 100, if this operations is completed, 5% work is done.
and the following methods:
@@ -68,7 +68,7 @@ class Operation:
self.script = s
self.score = scr
self.steps = 1
self.step = 0
self.current_step = 0
def install(self):
if display_operation:
@@ -84,8 +84,8 @@ class Operation:
line = process.stdout.readline()
if not line:
break
if line[0] == '@' and self.step < self.steps:
self.step += 1
if line[0] == '@' and self.current_step < self.steps:
self.current_step += 1
if display_sub_operation:
display_sub_operation(line[1:])
Rate.increase(float(self.score)/self.steps, max)