git.openpandora.org
/
openembedded.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bb753c4
)
oe.path.join: simplify a bit
author
Chris Larson
<chris_larson@mentor.com>
Thu, 15 Apr 2010 01:04:55 +0000
(18:04 -0700)
committer
Chris Larson
<chris_larson@mentor.com>
Fri, 23 Apr 2010 21:20:42 +0000
(14:20 -0700)
Signed-off-by: Chris Larson <chris_larson@mentor.com>
lib/oe/path.py
patch
|
blob
|
history
diff --git
a/lib/oe/path.py
b/lib/oe/path.py
index
dbaa08d
..
7dafdb1
100644
(file)
--- 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.