mirror of
https://github.com/fastogt/pyfastogt
synced 2025-03-09 23:38:55 +00:00
Typo
This commit is contained in:
parent
3ce89db833
commit
8f1a8737eb
1 changed files with 4 additions and 3 deletions
|
@ -21,7 +21,7 @@ class Message(object):
|
||||||
|
|
||||||
|
|
||||||
class Policy(object):
|
class Policy(object):
|
||||||
def __init__(self, cb):
|
def __init__(self, cb = None):
|
||||||
self.progress_ = 0.0
|
self.progress_ = 0.0
|
||||||
self.cb_ = cb
|
self.cb_ = cb
|
||||||
|
|
||||||
|
@ -31,7 +31,8 @@ class Policy(object):
|
||||||
|
|
||||||
def update_progress_message(self, progress, message):
|
def update_progress_message(self, progress, message):
|
||||||
self.progress_ = progress
|
self.progress_ = progress
|
||||||
self.process(Message(message, MessageType.STATUS))
|
msg = Message(message, MessageType.STATUS)
|
||||||
|
self.process(msg)
|
||||||
|
|
||||||
|
|
||||||
class CommonPolicy(Policy):
|
class CommonPolicy(Policy):
|
||||||
|
@ -111,7 +112,7 @@ class NinjaPolicy(Policy):
|
||||||
return None, None
|
return None, None
|
||||||
|
|
||||||
|
|
||||||
def run_command_cb(cmd: list, policy=Policy):
|
def run_command_cb(cmd: list, policy=Policy()):
|
||||||
try:
|
try:
|
||||||
policy.update_progress_message(0.0, 'Command {0} started'.format(cmd))
|
policy.update_progress_message(0.0, 'Command {0} started'.format(cmd))
|
||||||
process = subprocess.Popen(cmd, stdout=subprocess.PIPE)
|
process = subprocess.Popen(cmd, stdout=subprocess.PIPE)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue