aboutsummaryrefslogtreecommitdiffstats
path: root/library/python/testing/yatest_common
diff options
context:
space:
mode:
authoranastasy888 <anastasy888@yandex-team.ru>2022-02-10 16:45:55 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:45:55 +0300
commit3a7a498715ef1b66f5054455421b845e45e3a653 (patch)
tree1a2c5ffcf89eb53ecd79dbc9bc0a195c27404d0c /library/python/testing/yatest_common
parent49f765d71da452ea93138a25559dfa68dd76c7f3 (diff)
downloadydb-3a7a498715ef1b66f5054455421b845e45e3a653.tar.gz
Restoring authorship annotation for <anastasy888@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/python/testing/yatest_common')
-rw-r--r--library/python/testing/yatest_common/yatest/common/canonical.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/library/python/testing/yatest_common/yatest/common/canonical.py b/library/python/testing/yatest_common/yatest/common/canonical.py
index 4fa3defa77..b6a136d3e9 100644
--- a/library/python/testing/yatest_common/yatest/common/canonical.py
+++ b/library/python/testing/yatest_common/yatest/common/canonical.py
@@ -37,13 +37,13 @@ def canonical_file(path, diff_tool=None, local=False, universal_lines=False, dif
safe_path = os.path.join(tempdir, os.path.basename(abs_path))
# if the created file is in output_path, we copy it, so that it will be available when the tests finishes
_copy(path, safe_path, universal_lines=universal_lines)
- if diff_tool:
- if not isinstance(diff_tool, six.string_types):
- try: # check if iterable
- if not isinstance(diff_tool[0], six.string_types):
- raise Exception("Invalid custom diff-tool: not cmd")
- except:
- raise Exception("Invalid custom diff-tool: not binary path")
+ if diff_tool:
+ if not isinstance(diff_tool, six.string_types):
+ try: # check if iterable
+ if not isinstance(diff_tool[0], six.string_types):
+ raise Exception("Invalid custom diff-tool: not cmd")
+ except:
+ raise Exception("Invalid custom diff-tool: not binary path")
return runtime._get_ya_plugin_instance().file(safe_path, diff_tool=diff_tool, local=local, diff_file_name=diff_file_name, diff_tool_timeout=diff_tool_timeout)