Fix print variables without specifing profile.

Mike Hiretsky 14 years ago
parent 69ca4ed49a
commit 80954884ea

@ -534,7 +534,7 @@ class cl_builder(color_print):
{'from':source,'to':target}) {'from':source,'to':target})
self.printByResult(True) self.printByResult(True)
def setAssembleData(self,newprofile): def setAssembleData(self,newprofile,printVars=None):
"""Get assemble data from assemble.env""" """Get assemble data from assemble.env"""
envData = iniParser(self.envFile) envData = iniParser(self.envFile)
if newprofile == None: if newprofile == None:
@ -553,6 +553,8 @@ class cl_builder(color_print):
likeProfile = filter(reProfile.search, likeProfile = filter(reProfile.search,
self.clVars.Get('cl_builder_distro')) self.clVars.Get('cl_builder_distro'))
if len(likeProfile) != 1: if len(likeProfile) != 1:
if printVars:
return True
if newprofile != "list": if newprofile != "list":
if not newprofile: if not newprofile:
self.printERROR(_("need specify '--profile'")) self.printERROR(_("need specify '--profile'"))

@ -114,7 +114,7 @@ class image_cmd(share_cmd):
if not self.isScratch(False) \ if not self.isScratch(False) \
and self.logicObj.clVars.Get('cl_builder_distro'): and self.logicObj.clVars.Get('cl_builder_distro'):
if not self.logicObj.setAssembleData(values.p): if not self.logicObj.setAssembleData(values.p,values.v):
sys.exit(1) sys.exit(1)
if args and args[0] == "squash": if args and args[0] == "squash":

Loading…
Cancel
Save