fix local repository failed to perform urlgrabber
authorGui Chen <gui.chen@intel.com>
Wed, 5 Mar 2014 05:58:56 +0000 (00:58 -0500)
committerGui Chen <gui.chen@intel.com>
Wed, 5 Mar 2014 06:28:06 +0000 (08:28 +0200)
Change-Id: I80873c643d207b348c77057c600ce20c6797b3d7
Signed-off-by: Gui Chen <gui.chen@intel.com>
mic/conf.py

index e52317e7f25ed3086167c905f3d7912e18df9930..f99bb396bd50c6e3b6375dbe4ef4f606296aa240 100644 (file)
@@ -209,8 +209,8 @@ class ConfigMgr(object):
             raise errors.KsError('no valid repos found in ks file')
 
         for repo in ksrepos:
-            if 'baseurl' in repo and repo['baseurl'].startswith("file:"):
-                repourl = repo['baseurl'].replace('file:', '')
+            if hasattr(repo, 'baseurl') and repo.baseurl.startswith("file:"):
+                repourl = repo.baseurl.replace('file:', '')
                 repourl = "/%s" % repourl.lstrip('/')
                 self.create['localrepos'].append(repourl)