From 5d43f703c6d38758aace84fbac696a17dcdb5bbb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C5=82awomir=20Nizio?= Date: Fri, 5 Jun 2015 21:00:17 +0200 Subject: [PATCH] [noarch/entropy] prettify the code of packages.server.qa.exec Whilst waiting for Portage/building... --- .../entropy/packages/packages.server.qa.exec | 36 +++++++------------ 1 file changed, 13 insertions(+), 23 deletions(-) diff --git a/conf/noarch/entropy/packages/packages.server.qa.exec b/conf/noarch/entropy/packages/packages.server.qa.exec index 7ec8f1ad..d873c4a7 100755 --- a/conf/noarch/entropy/packages/packages.server.qa.exec +++ b/conf/noarch/entropy/packages/packages.server.qa.exec @@ -243,30 +243,20 @@ def warn_haskell_bump(): if __name__ == "__main__": exit_st = 0 - rc = check_unwanted_deps() - if rc != 0: - exit_st = rc - rc = warn_portage_bump() - if rc != 0 and rc > exit_st: - exit_st = rc + checks = [ + check_unwanted_deps, + warn_portage_bump, + warn_perl5_bump, + warn_haskell_bump, + warn_binutils_bump, + warn_sip_bump + # more tests here + ] - rc = warn_perl5_bump() - if rc != 0 and rc > exit_st: - exit_st = rc - - rc = warn_haskell_bump() - if rc != 0 and rc > exit_st: - exit_st = rc - - rc = warn_binutils_bump() - if rc != 0 and rc > exit_st: - exit_st = rc - - rc = warn_sip_bump() - if rc != 0 and rc > exit_st: - exit_st = rc - - # more tests here + for check in checks: + rc = check() + if rc > exit_st: + exit_st = rc raise SystemExit(exit_st)