beremiz
Clone
Summary
Browse
Changes
Graph
Extensions: add optional arguments to ThirdPartyPath
py2compat
23 months ago, Edouard Tisserant
be649777f96a
Parents
90a67418b8cf
Children
c13f5e92ce53
Extensions: add optional arguments to ThirdPartyPath
ThirdPartyPath("name", "path1", "path2") will resolve by default into "../name/path1/path2"
1 files changed, 2 insertions(+), 2 deletions(-)
+2
-2
util/paths.py
--- a/util/paths.py Tue Jul 09 11:40:36 2024 +0200
+++ b/util/paths.py Tue Jul 09 11:44:49 2024 +0200
@@ -49,9 +49,9 @@
path = os.path.dirname(path)
return path
-def ThirdPartyPath(name):
+def ThirdPartyPath(name, *suffixes):
"""
Return folder where to find sibling projects like Modbus, CanFestival, BACnet
"""
- return os.path.join(AbsParentDir(__file__, 2), name)
+ return os.path.join(AbsParentDir(__file__, 2), name, *suffixes)