]> code.ossystems Code Review - openembedded-core.git/commitdiff
lib/oe/package_manager: adapt for Python 3
authorRoss Burton <ross.burton@intel.com>
Sun, 5 Jun 2016 21:52:42 +0000 (22:52 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sun, 5 Jun 2016 22:39:43 +0000 (23:39 +0100)
string.rstrip() doesn't exist in Python 3, so use the .rstrip method on the
object itself instead.

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oe/package_manager.py

index 71e5b502e793d477496915464bb523e93464a0f8..3b1d24fff2940e2c84d2875b3c408836ec0f2b87 100644 (file)
@@ -638,8 +638,8 @@ class PackageManager(object, metaclass=ABCMeta):
     def construct_uris(self, uris, base_paths):
         def _append(arr1, arr2, sep='/'):
             res = []
-            narr1 = [string.rstrip(a, sep) for a in arr1]
-            narr2 = [string.lstrip(string.rstrip(a, sep), sep) for a in arr2]
+            narr1 = [a.rstrip(sep) for a in arr1]
+            narr2 = [a.rstrip(sep).lstrip(sep) for a in arr2]
             for a1 in narr1:
                 if arr2:
                     for a2 in narr2: