[elbe-devel] [PATCH 05/16] commands: initvm: fix pylint

Torben Hohn torben.hohn at linutronix.de
Wed Jul 28 17:40:41 CEST 2021


elbepack/commands/initvm.py:78:7: C1801: Do not use `len(SEQUENCE)` to determine if a sequence is empty (len-as-condition)

Signed-off-by: Torben Hohn <torben.hohn at linutronix.de>
---
 elbepack/commands/initvm.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/elbepack/commands/initvm.py b/elbepack/commands/initvm.py
index b1d97888d..321af3fbc 100644
--- a/elbepack/commands/initvm.py
+++ b/elbepack/commands/initvm.py
@@ -75,7 +75,7 @@ def run_command(argv):
 
     (opt, args) = oparser.parse_args(argv)
 
-    if len(args) < 1:
+    if not args:
         print("elbe initvm - no subcommand given", file=sys.stderr)
         InitVMAction.print_actions()
         sys.exit(20)
-- 
2.20.1



More information about the elbe-devel mailing list