diff options
| author | Daniil Cherednik <[email protected]> | 2022-09-21 20:17:38 +0300 |
|---|---|---|
| committer | Daniil Cherednik <[email protected]> | 2022-09-21 20:17:38 +0300 |
| commit | e6c9b17192c56494adba359d5e132c431b241191 (patch) | |
| tree | 6f2449871a118a0e8919ce842b1174e06cb470ef /library/python | |
| parent | 285021ab1aac39e84b269d9bacd4deee69cf63fc (diff) | |
Ydb stable 22-4-2122.4.21
x-stable-origin-commit: e89099581237299a132feafb5b58af59ebd0468a
Diffstat (limited to 'library/python')
| -rw-r--r-- | library/python/cores/__init__.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/library/python/cores/__init__.py b/library/python/cores/__init__.py index e3eea6ab5db..e99b8f65dfd 100644 --- a/library/python/cores/__init__.py +++ b/library/python/cores/__init__.py @@ -4,6 +4,7 @@ import os import re import glob import socket +import sys import logging import platform import subprocess @@ -93,7 +94,10 @@ def recover_core_dump_file(binary_path, cwd, pid, core_pattern=None): oct(stat.S_ISVTX), ) logger.debug("Search for core dump files match pattern '%s' in '%s'", pattern.mask, pattern.path) - cores = glob.glob(os.path.join(pattern.path, pattern.mask)) + escaped_pattern_path = pattern.path + if sys.version_info[0] == 3: + escaped_pattern_path = glob.escape(pattern.path) + cores = glob.glob(os.path.join(escaped_pattern_path, pattern.mask)) files = os.listdir(pattern.path) logger.debug( "Matched core dump files (%d/%d): [%s] (mismatched samples: %s)", |
