From 75550fdaea6533e50cd152e8d133a3ef15fa2b71 Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Sat, 6 Oct 2018 14:31:49 +0200 Subject: [PATCH] nvmetcli: simplify the enabled logic pep8 complains about the overlong line, and this can be simplied by transforming the boolean logic. Signed-off-by: Christoph Hellwig --- nvmetcli | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nvmetcli b/nvmetcli index 03a1e9f..8242364 100755 --- a/nvmetcli +++ b/nvmetcli @@ -404,7 +404,7 @@ class UIPortNode(UINode): inline_data_size = "n/a" if inline_data_size != "n/a": info.append("inline_data_size=" + inline_data_size) - enabled = not (not self.cfnode.subsystems and not list(self.cfnode.referrals)) + enabled = self.cfnode.subsystems or list(self.cfnode.referrals) return (", ".join(info), True if enabled else 0) -- 2.50.1