summaryrefslogtreecommitdiff
path: root/lib/oe
diff options
context:
space:
mode:
authorChris Larson <chris_larson@mentor.com>2010-04-14 18:04:55 -0700
committerChris Larson <chris_larson@mentor.com>2010-04-23 14:20:42 -0700
commit38cf80fce6aff11422770d84f21113f38c8dc57a (patch)
tree26c2ddc35135f6291bd23ee223fd34fe1358e3e2 /lib/oe
parentbb753c4f0bc7fe463e7939a1f2685504a9a0f883 (diff)
oe.path.join: simplify a bit
Signed-off-by: Chris Larson <chris_larson@mentor.com>
Diffstat (limited to 'lib/oe')
-rw-r--r--lib/oe/path.py11
1 files changed, 3 insertions, 8 deletions
diff --git a/lib/oe/path.py b/lib/oe/path.py
index dbaa08d856..7dafdb173e 100644
--- a/lib/oe/path.py
+++ b/lib/oe/path.py
@@ -1,12 +1,7 @@
-def join(a, *p):
+def join(*paths):
"""Like os.path.join but doesn't treat absolute RHS specially"""
- path = a
- for b in p:
- if path == '' or path.endswith('/'):
- path += b
- else:
- path += '/' + b
- return path
+ import os.path
+ return os.path.normpath("/".join(paths))
def relative(src, dest):
""" Return a relative path from src to dest.