From: Chris Larson Date: Thu, 15 Apr 2010 01:04:55 +0000 (-0700) Subject: oe.path.join: simplify a bit X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=38cf80fce6aff11422770d84f21113f38c8dc57a;p=openembedded.git oe.path.join: simplify a bit Signed-off-by: Chris Larson --- 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.