diff --git a/archrepo2/repomon.py b/archrepo2/repomon.py index e7efa37..e134a9c 100755 --- a/archrepo2/repomon.py +++ b/archrepo2/repomon.py @@ -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: