Return-Path: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=profusion-mobi.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=SunWvxQibjX0a1kgLyrxWJSpXDmv9Iqpfu3cY2wf/2I=; b=UgzkjyOAe1INPNtGkZrniOaRXn52DXcnmhyOmupjByBY5ScQOobCcGrlrgmTIWW4JN e8UMa325Q7Z6g98mEcW3l1utvPnhDLzOP+U9DxLrPJlFTUHlIxTRNazhlkEzzC2O907E mCkCeF+LIHWA+B8cD8GNTXYJQW/p1ad9l90TxfVM+PS1U+I447qKn8dWx5DIELwTgqVY qXWG8E3DggGuA8kIQ3yeaxw6mRuvndA+CldbFlbR8LdqrwtOw9gUunWqodFoMtIWz4tg WW1jdF4MRkR1fI9Z1B0DPox6H8+FcUO1LfAZT9WEIwxRMXaQb91j9UV9grTPm00d7YU0 68yA== From: Guilherme Campos Camargo Date: Tue, 3 Apr 2018 14:56:51 -0300 Message-Id: <20180403175653.5458-7-guicc@profusion.mobi> In-Reply-To: <20180403175653.5458-1-guicc@profusion.mobi> References: <20180403175653.5458-1-guicc@profusion.mobi> Subject: [Fuego] [PATCH 6/8] Avoid reordering conditional logic to improve readability List-Id: Mailing list for the Fuego test framework List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: fuego@lists.linuxfoundation.org Replace Python's ternary conditional operation with the traditional multi-line if/else to improve readability. Signed-off-by: Guilherme Campos Camargo --- engine/tests/Functional.fuego_release_test/test_run.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/engine/tests/Functional.fuego_release_test/test_run.py b/engine/tests/Functional.fuego_release_test/test_run.py index 873ca21..4b43df4 100755 --- a/engine/tests/Functional.fuego_release_test/test_run.py +++ b/engine/tests/Functional.fuego_release_test/test_run.py @@ -349,7 +349,10 @@ class FuegoContainer: except KeyError: return False - return False if container_addr is None else True + if container_addr is None: + return False + else: + return True if not loop_until_timeout(fetch_ip, timeout=10): LOGGER.error("Could not fetch the container IP address") -- 2.16.3