aboutsummaryrefslogtreecommitdiffstats
path: root/library/python/runtime_py3/sitecustomize.pyx
diff options
context:
space:
mode:
authorshadchin <shadchin@yandex-team.com>2024-02-12 07:53:52 +0300
committershadchin <shadchin@yandex-team.com>2024-02-12 08:07:36 +0300
commitce1b7ca3171f9158180640c6a02a74b4afffedea (patch)
treee47c1e8391b1b0128262c1e9b1e6ed4c8fff2348 /library/python/runtime_py3/sitecustomize.pyx
parent57350d96f030db90f220ce50ee591d5c5d403df7 (diff)
downloadydb-ce1b7ca3171f9158180640c6a02a74b4afffedea.tar.gz
Update Python from 3.11.8 to 3.12.2
Diffstat (limited to 'library/python/runtime_py3/sitecustomize.pyx')
-rw-r--r--library/python/runtime_py3/sitecustomize.pyx13
1 files changed, 5 insertions, 8 deletions
diff --git a/library/python/runtime_py3/sitecustomize.pyx b/library/python/runtime_py3/sitecustomize.pyx
index 25b4ccb55a..46ca0f986e 100644
--- a/library/python/runtime_py3/sitecustomize.pyx
+++ b/library/python/runtime_py3/sitecustomize.pyx
@@ -115,21 +115,18 @@ class ArcadiaResourceContainer(Traversable):
class ArcadiaDistribution(Distribution):
def __init__(self, prefix):
- self.prefix = prefix
-
- @property
- def _path(self):
- return pathlib.Path(self.prefix)
+ self._prefix = prefix
+ self._path = pathlib.Path(prefix)
def read_text(self, filename):
- data = __res.resfs_read(f"{self.prefix}{filename}")
- if data:
+ data = __res.resfs_read(f"{self._prefix}{filename}")
+ if data is not None:
return data.decode("utf-8")
read_text.__doc__ = Distribution.read_text.__doc__
def locate_file(self, path):
- return f"{self.prefix}{path}"
+ return self._path.parent / path
class ArcadiaMetadataFinder(DistributionFinder):