aboutsummaryrefslogtreecommitdiffstats
path: root/library/python/fs
diff options
context:
space:
mode:
authorworkfork <workfork@yandex-team.ru>2022-02-10 16:46:43 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:43 +0300
commitc3745173272d1cf5b0642debb40d019e7ae71094 (patch)
treedaee509c9d920ccdc727dbf1254b2183bf5f64aa /library/python/fs
parent656921707c02b816d730f31c1fdc1d615adbfe00 (diff)
downloadydb-c3745173272d1cf5b0642debb40d019e7ae71094.tar.gz
Restoring authorship annotation for <workfork@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/python/fs')
-rw-r--r--library/python/fs/__init__.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/library/python/fs/__init__.py b/library/python/fs/__init__.py
index b1b7cde079..f56b9a9c0b 100644
--- a/library/python/fs/__init__.py
+++ b/library/python/fs/__init__.py
@@ -215,7 +215,7 @@ def hardlink_or_copy(src, lnk):
try:
hardlink(src, lnk)
except Exception as e:
- logger.debug('Failed to hardlink %s to %s with error %s, will copy it', src, lnk, repr(e))
+ logger.debug('Failed to hardlink %s to %s with error %s, will copy it', src, lnk, repr(e))
if should_fallback_to_copy(e):
copy2(src, lnk, follow_symlinks=False)
else:
@@ -310,13 +310,13 @@ def read_file_unicode(path, binary=True, enc='utf-8'):
return f.read()
-@errorfix_win
-def open_file(*args, **kwargs):
+@errorfix_win
+def open_file(*args, **kwargs):
return (
library.python.windows.open_file(*args, **kwargs) if library.python.windows.on_win() else open(*args, **kwargs)
)
-
-
+
+
# Atomic file write
# Throws OSError
@errorfix_win
@@ -325,7 +325,7 @@ def write_file(path, data, binary=True):
if dir_path:
ensure_dir(dir_path)
tmp_path = path + '.tmp.' + str(random.random())
- with open_file(tmp_path, 'w' + ('b' if binary else '')) as f:
+ with open_file(tmp_path, 'w' + ('b' if binary else '')) as f:
if not isinstance(data, bytes) and binary:
data = data.encode('UTF-8')
f.write(data)