From 61fcbe0d51e08798df35d7e0a0f3590e5bde94eb Mon Sep 17 00:00:00 2001 From: Rene Moser Date: Fri, 11 Sep 2015 21:20:20 +0200 Subject: [PATCH] composer: simplify has_changed() --- lib/ansible/modules/extras/packaging/language/composer.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/ansible/modules/extras/packaging/language/composer.py b/lib/ansible/modules/extras/packaging/language/composer.py index 8e11d25216..54cb3f17ba 100644 --- a/lib/ansible/modules/extras/packaging/language/composer.py +++ b/lib/ansible/modules/extras/packaging/language/composer.py @@ -109,10 +109,7 @@ def parse_out(string): return re.sub("\s+", " ", string).strip() def has_changed(string): - if "Nothing to install or update" in string: - return False - else: - return True + return "Nothing to install or update" not in string def composer_install(module, command, options): php_path = module.get_bin_path("php", True, ["/usr/local/bin"])