Fix simple command.

This commit is contained in:
redxef 2022-11-05 15:01:48 +01:00
parent ef8bf677ae
commit 092a4bccfe
Signed by: redxef
GPG key ID: 7DAC3AA211CBD921

View file

@ -302,9 +302,9 @@ class Command(str):
@classmethod
def validate(cls, v):
if not isinstance(v, (str, list)):
if not isinstance(v, (str, list, tuple)):
raise TypeError('Must be string or list')
if isinstance(v, list):
if isinstance(v, (list, tuple)):
v = ' '.join([f"'{x}'" for x in v])
return v