From 48a977e0f2f30ebcdd3bf61f5b85047d67aae569 Mon Sep 17 00:00:00 2001 From: Warren Usui Date: Mon, 29 Jul 2013 19:20:43 -0700 Subject: [PATCH] Always raise exception if yum install fails. This avoids later confusion when packages are missing (the old code skipped 'Nothing to do' messages, but these cases are still errors). Fixes #5803 Signed-off-by: Warren Usui Reviewed by: Sandon Van Ness --- teuthology/task/install.py | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/teuthology/task/install.py b/teuthology/task/install.py index 418df1ff0c261..fe5416330a0bb 100644 --- a/teuthology/task/install.py +++ b/teuthology/task/install.py @@ -213,16 +213,7 @@ def _update_rpm_package_list_and_install(ctx, remote, rpm, config): remote.run(args=['sudo', 'yum', 'install', pkg2add, '-y',], stderr=pk_err_mess) except: - err_str = pk_err_mess.getvalue().strip() - if err_str.find("Error: ") >= 0: - ok_msg_loc = err_str.find("Error: Nothing to do") - if ok_msg_loc < 0: - raise - # Check for other error strings (I'm being paranoid). - if err_str[0:ok_msg_loc].find("Error: ") > 0: - raise - if err_str[ok_msg_loc+1:].find("Error: ") > 0: - raise + raise def purge_data(ctx): """ -- 2.39.5