changeset ce683c18b5f1 in trytond:default
details: https://hg.tryton.org/trytond?cmd=changeset&node=ce683c18b5f1
description:
Use _test function instead of isfile when testing egg modules
issue11668
review427621004
diffstat:
trytond/tools/misc.py | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (23 lines):
diff -r 61b946049607 -r ce683c18b5f1 trytond/tools/misc.py
--- a/trytond/tools/misc.py Mon Aug 08 22:16:56 2022 +0200
+++ b/trytond/tools/misc.py Fri Aug 26 09:53:30 2022 +0200
@@ -52,16 +52,16 @@
*epoint.module_name.split('.')[:-1])
mod_path = os.path.abspath(mod_path)
egg_name = secure_join(mod_path, name)
- if not os.path.isfile(egg_name):
+ if not _test(egg_name):
# Find module in path
for path in sys.path:
mod_path = os.path.join(path,
*epoint.module_name.split('.')[:-1])
mod_path = os.path.abspath(mod_path)
egg_name = secure_join(mod_path, name)
- if os.path.isfile(egg_name):
+ if _test(egg_name):
break
- if not os.path.isfile(egg_name):
+ if not _test(egg_name):
# When testing modules from setuptools location is the
# module directory
egg_name = secure_join(