[fix] Python3 migration: File args with log

This commit is contained in:
ljf 2021-05-08 23:58:36 +02:00
parent 1d33f333cd
commit 91e7e5e1c8

View file

@ -373,10 +373,11 @@ 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):
context[field] = value.name try:
elif isinstance(value, IOBase): context[field] = value.name
context[field] = 'IOBase' except:
context[field] = 'IOBase'
operation_logger = OperationLogger(op_key, related_to, args=context) operation_logger = OperationLogger(op_key, related_to, args=context)
try: try: