Add unicode formatting as regular strings to all filename printouts
@@ -314,16 +314,19 @@ class CheckResource(object):
file_id=res_file.pk, fail_feedback=False)
if not res_file.has_logical_file and file_type is not None:
msg = "check_resource: file {} does not have required logical file {}"\
- .format(res_file.storage_path, file_type.__name__)
+ .format(res_file.storage_path.encode('string-escape'),
+ file_type.__name__)
logical_issues.append(msg)
elif res_file.has_logical_file and file_type is None:
msg = "check_resource: logical file for {} has type {}, not needed"\
- .format(res_file.storage_path, type(res_file.logical_file).__name__)
+ .format(res_file.storage_path.encode('string-escape'),
+ type(res_file.logical_file).__name__)
logical_issues.append(msg)
elif res_file.has_logical_file and file_type is not None and \
not isinstance(res_file.logical_file, file_type):
msg = "check_resource: logical file for {} has type {}, should be {}"\
- .format(res_file.storage_path, type(res_file.logical_file).__name__,
+ .format(res_file.storage_path.encode('string-escape'),
+ type(res_file.logical_file).__name__,
file_type.__name__)
logical_issues.append(msg)
