Fix the bug that use local mic-bootstrap to run mic.
authormao xiaojuan <xiaojuan.mao@samsung.com>
Tue, 28 Nov 2017 08:58:58 +0000 (16:58 +0800)
committermao xiaojuan <xiaojuan.mao@samsung.com>
Tue, 28 Nov 2017 08:59:59 +0000 (16:59 +0800)
Change-Id: I3266c24c2d7be8e7fe91e2d24c6b4f0afb62da87

mic/bootstrap.py

index 2653c35..f911414 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):