From 38cf80fce6aff11422770d84f21113f38c8dc57a Mon Sep 17 00:00:00 2001
From: Chris Larson <chris_larson@mentor.com>
Date: Wed, 14 Apr 2010 18:04:55 -0700
Subject: oe.path.join: simplify a bit

Signed-off-by: Chris Larson <chris_larson@mentor.com>
---
 lib/oe/path.py | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

(limited to 'lib')

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.
-- 
cgit v1.2.3