From ee21aec66aec60b1a4d845b5abd933b6eff33165 Mon Sep 17 00:00:00 2001 From: lilydjwg Date: Sat, 15 Dec 2012 18:41:03 +0800 Subject: [PATCH] fix command exit code reporting --- archreposrv | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/archreposrv b/archreposrv index a8a87d6..9ce3a98 100755 --- a/archreposrv +++ b/archreposrv @@ -73,9 +73,10 @@ class RepoMan: p.set_exit_callback(partial(self.command_done, callbacks)) def command_done(self, callbacks, status): - if status == 0 and callbacks: - for cb in callbacks: - cb() + if status == 0: + if callbacks: + for cb in callbacks: + cb() logging.info('previous command done.') else: logging.warn('previous command failed with status code %d.', status)