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}')
|
self._write(f'v {v}')
|
||||||
return self._read()
|
return self._read()
|
||||||
|
|
||||||
def format(self, format):
|
def format(self, fmt):
|
||||||
self._write(f'format {format}')
|
if isinstance(fmt, Format):
|
||||||
|
fmt = fmt.value
|
||||||
|
self._write(f'format {fmt}')
|
||||||
return self._read()
|
return self._read()
|
||||||
|
|
||||||
def exec(self, command, arguments=()):
|
def exec(self, command, arguments=()):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user