format(): support Format(Enum) as an argument
This commit is contained in:
parent
c9edd67172
commit
1117fd9b81
@ -45,8 +45,10 @@ class Client:
|
||||
self._write(f'v {v}')
|
||||
return self._read()
|
||||
|
||||
def format(self, format):
|
||||
self._write(f'format {format}')
|
||||
def format(self, fmt):
|
||||
if isinstance(fmt, Format):
|
||||
fmt = fmt.value
|
||||
self._write(f'format {fmt}')
|
||||
return self._read()
|
||||
|
||||
def exec(self, command, arguments=()):
|
||||
|
Loading…
x
Reference in New Issue
Block a user