Fix the bug that use local mic-bootstrap to run mic. 04/168504/1
authormao xiaojuan <xiaojuan.mao@samsung.com>
Tue, 28 Nov 2017 08:58:58 +0000 (16:58 +0800)
committermao xiaojuan <xiaojuan.mao@samsung.com>
Mon, 29 Jan 2018 06:08:56 +0000 (14:08 +0800)
Change-Id: I3266c24c2d7be8e7fe91e2d24c6b4f0afb62da87

mic/bootstrap.py

index 2801678..b51b79a 100644 (file)
@@ -102,7 +102,7 @@ class MiniBackend(object):
                 elif len(pkglist) == 1:
                     return ''.join(pkglist)
             elif os.path.splitext(cropts['local_pkgs_path'])[-1] == '.rpm':
-                if cropts['local_pkgs_path'].index(pkg) > -1:
+                if cropts['local_pkgs_path'].find(pkg) >= 0:
                     return cropts['local_pkgs_path']
         return None
     def runInstall(self):