packages are missing (the old code skipped 'Nothing to do' messages, but these
cases are still errors).
Fixes #5803
Signed-off-by: Warren Usui <warren.usui@inktank.com>
Reviewed by: Sandon Van Ness
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):
"""