diff options
author | iaz1607 <iaz1607@yandex-team.ru> | 2022-02-10 16:45:37 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:45:37 +0300 |
commit | 94e51c602b555459333b3c6ae92476c424c930bc (patch) | |
tree | b2cc84ee7850122e7ccf51d0ea21e4fa7e7a5685 /library/python/testing/yatest_common | |
parent | e5437feb4ac2d2dc044e1090b9312dde5ef197e0 (diff) | |
download | ydb-94e51c602b555459333b3c6ae92476c424c930bc.tar.gz |
Restoring authorship annotation for <iaz1607@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/python/testing/yatest_common')
3 files changed, 18 insertions, 18 deletions
diff --git a/library/python/testing/yatest_common/yatest/common/path.py b/library/python/testing/yatest_common/yatest/common/path.py index 313c67ef39..6fed7dda8a 100644 --- a/library/python/testing/yatest_common/yatest/common/path.py +++ b/library/python/testing/yatest_common/yatest/common/path.py @@ -59,7 +59,7 @@ def copytree(src, dst, symlinks=False, ignore=None, postprocessing=None): def get_unique_file_path(dir_path, file_pattern, create_file=True, max_suffix=10000): def atomic_file_create(path): try: - fd = os.open(path, os.O_CREAT | os.O_EXCL, 0o644) + fd = os.open(path, os.O_CREAT | os.O_EXCL, 0o644) os.close(fd) return True except OSError as e: diff --git a/library/python/testing/yatest_common/yatest/common/process.py b/library/python/testing/yatest_common/yatest/common/process.py index 58e12d8f69..a8bcc21f51 100644 --- a/library/python/testing/yatest_common/yatest/common/process.py +++ b/library/python/testing/yatest_common/yatest/common/process.py @@ -79,12 +79,12 @@ class InvalidExecutionStateError(Exception): pass -class SignalInterruptionError(Exception): - def __init__(self, message=None): - super(SignalInterruptionError, self).__init__(message) - self.res = None - - +class SignalInterruptionError(Exception): + def __init__(self, message=None): + super(SignalInterruptionError, self).__init__(message) + self.res = None + + class InvalidCommandError(Exception): pass @@ -284,7 +284,7 @@ class _Execution(object): def wait(self, check_exit_code=True, timeout=None, on_timeout=None): def _wait(): finished = None - interrupted = False + interrupted = False try: if hasattr(os, "wait4"): try: @@ -321,12 +321,12 @@ class _Execution(object): yatest_logger.debug("Process resource usage is not available as process finished before wait4 was called") else: raise - except SignalInterruptionError: - interrupted = True - raise + except SignalInterruptionError: + interrupted = True + raise finally: - if not interrupted: - self._process.wait() # this has to be here unconditionally, so that all process properties are set + if not interrupted: + self._process.wait() # this has to be here unconditionally, so that all process properties are set if not finished: finished = time.time() diff --git a/library/python/testing/yatest_common/yatest/common/runtime.py b/library/python/testing/yatest_common/yatest/common/runtime.py index 80f8f70db4..e55e193446 100644 --- a/library/python/testing/yatest_common/yatest/common/runtime.py +++ b/library/python/testing/yatest_common/yatest/common/runtime.py @@ -242,11 +242,11 @@ def c_compiler_path(): return os.environ.get("YA_CC") -def get_yt_hdd_path(path=None): - if 'HDD_PATH' in os.environ: - return _join_path(os.environ['HDD_PATH'], path) - - +def get_yt_hdd_path(path=None): + if 'HDD_PATH' in os.environ: + return _join_path(os.environ['HDD_PATH'], path) + + def cxx_compiler_path(): """ Get path to the gdb |