mirror of
https://github.com/lilydjwg/archrepo2.git
synced 2025-03-10 12:02:43 +00:00
run next command when this one fails
This commit is contained in:
parent
386b8e3a6d
commit
7fea77f5ae
1 changed files with 5 additions and 2 deletions
|
@ -92,12 +92,15 @@ class RepoMan:
|
|||
return
|
||||
|
||||
logger.info('Running cmd: %r', cmd)
|
||||
# have to specify io_loop or we'll get error tracebacks
|
||||
# have to specify io_loop or we'll get error tracebacks in some versions
|
||||
# of Tornado
|
||||
try:
|
||||
p = tornado.process.Subprocess(cmd, io_loop=self._ioloop)
|
||||
p.set_exit_callback(partial(self.command_done, callbacks))
|
||||
except OSError:
|
||||
logger.error('failed to run command.', exc_info=True)
|
||||
self.run_command()
|
||||
else:
|
||||
p.set_exit_callback(partial(self.command_done, callbacks))
|
||||
|
||||
def command_done(self, callbacks, status):
|
||||
if status == 0:
|
||||
|
|
Loading…
Add table
Reference in a new issue