def _format_local(local_path, local_is_path):
 if local_is_path:
  return local_path
 else:
  return getattr(local_path, 'name', '<file obj>')

def _format_local ( local_path , local_is_path ) : if local_is_path : return local_path else : return getattr ( local_path , 'name' , '<file obj>' )
format a path for log output .