From d4fa5eeb5835be986f974ad5fa5295f188887de7 Mon Sep 17 00:00:00 2001 From: hamistao Date: Thu, 9 Jan 2025 10:00:09 -0300 Subject: [PATCH] pylxd/models: Improve type check Signed-off-by: hamistao --- pylxd/models/instance.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pylxd/models/instance.py b/pylxd/models/instance.py index f404e63f..6ace85ea 100644 --- a/pylxd/models/instance.py +++ b/pylxd/models/instance.py @@ -442,7 +442,7 @@ def execute( :returns: A tuple of `(exit_code, stdout, stderr)` :rtype: _InstanceExecuteResult() namedtuple """ - if isinstance(commands, str): + if not isinstance(commands, list): raise TypeError("First argument must be a list.") if environment is None: environment = {}