mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
[fix] Python3 migration: File args with log
This commit is contained in:
parent
1d33f333cd
commit
91e7e5e1c8
1 changed files with 5 additions and 4 deletions
|
@ -373,9 +373,10 @@ def is_unit_operation(
|
||||||
if field in context:
|
if field in context:
|
||||||
context.pop(field, None)
|
context.pop(field, None)
|
||||||
for field, value in context.items():
|
for field, value in context.items():
|
||||||
if isinstance(value, file):
|
if isinstance(value, IOBase):
|
||||||
|
try:
|
||||||
context[field] = value.name
|
context[field] = value.name
|
||||||
elif isinstance(value, IOBase):
|
except:
|
||||||
context[field] = 'IOBase'
|
context[field] = 'IOBase'
|
||||||
operation_logger = OperationLogger(op_key, related_to, args=context)
|
operation_logger = OperationLogger(op_key, related_to, args=context)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue