Change-Id: I80873c643d207b348c77057c600ce20c6797b3d7
Signed-off-by: Gui Chen <gui.chen@intel.com>
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)