summaryrefslogtreecommitdiffstats
path: root/meta/lib
diff options
context:
space:
mode:
Diffstat (limited to 'meta/lib')
-rw-r--r--meta/lib/oe/utils.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/meta/lib/oe/utils.py b/meta/lib/oe/utils.py
index cedd053d36..a4fd79ccb2 100644
--- a/meta/lib/oe/utils.py
+++ b/meta/lib/oe/utils.py
@@ -78,12 +78,12 @@ def prune_suffix(var, suffixes, d):
78 # See if var ends with any of the suffixes listed and 78 # See if var ends with any of the suffixes listed and
79 # remove it if found 79 # remove it if found
80 for suffix in suffixes: 80 for suffix in suffixes:
81 if var.endswith(suffix): 81 if suffix and var.endswith(suffix):
82 var = var.replace(suffix, "") 82 var = var[:-len(suffix)]
83 83
84 prefix = d.getVar("MLPREFIX") 84 prefix = d.getVar("MLPREFIX")
85 if prefix and var.startswith(prefix): 85 if prefix and var.startswith(prefix):
86 var = var.replace(prefix, "") 86 var = var[len(prefix):]
87 87
88 return var 88 return var
89 89