changeset 66d558a42492 in trytond:6.4
details: https://hg.tryton.org/trytond?cmd=changeset&node=66d558a42492
description:
Use _test function instead of isfile when testing egg modules
issue11668
review427621004
(grafted from ce683c18b5f12749fa9802264eeab90c7be56922)
diffstat:
trytond/tools/misc.py | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (23 lines):
diff -r 4581fe9a1457 -r 66d558a42492 trytond/tools/misc.py
--- a/trytond/tools/misc.py Wed Aug 17 23:28:08 2022 +0200
+++ b/trytond/tools/misc.py Fri Aug 26 09:53:30 2022 +0200
@@ -51,16 +51,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(