[rtems-source-builder commit] sb: Fix path.py

Chris Johns chrisj at rtems.org
Sun Feb 4 22:41:16 UTC 2018


Module:    rtems-source-builder
Branch:    master
Commit:    dde330b8f82593d9196fa05e2d11e3a6f7852892
Changeset: http://git.rtems.org/rtems-source-builder/commit/?id=dde330b8f82593d9196fa05e2d11e3a6f7852892

Author:    Stephan Gambke <s7eph4n at protonmail.com>
Date:      Sat Feb  3 10:02:45 2018 -0500

sb: Fix path.py

is_abspath() now considers zero-length strings

Also: Remove not needed line in expand()

---

 source-builder/sb/path.py | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/source-builder/sb/path.py b/source-builder/sb/path.py
index 679436c..f851139 100644
--- a/source-builder/sb/path.py
+++ b/source-builder/sb/path.py
@@ -54,7 +54,7 @@ def host(path):
     return path
 
 def is_abspath(path):
-    if path is not None:
+    if path is not None and len(path) > 0:
         return '/' == path[0]
     return False
 
@@ -218,7 +218,6 @@ def removeall(path):
         _remove_node(path)
 
 def expand(name, paths):
-    path = shell(path)
     l = []
     for p in paths:
         l += [join(shell(p), name)]




More information about the vc mailing list