Modified order of cl_autoupdate variable set.

setVars return to place before setInstallOption, because --set may
affect to different default values of variables.
master3.3
Mike Hiretsky 14 years ago
parent 4be904b8be
commit ca36e263cf

@ -371,3 +371,18 @@ class install_cmd(share_cmd):
return True
else:
return False
def setAutoupdate(self, optObj):
"""Установка переменных"""
if optObj.set:
for vals in optObj.set:
for val in vals.split(','):
k,o,v = val.partition('=')
if k == "cl_autoupdate_set":
if self.logicObj.clVars.exists(k):
if not self.logicObj.clVars.SetWriteVar(k,v):
return False
else:
self.printERROR(_('variable %s not found')%k)
return False
return True

@ -43,13 +43,16 @@ if __name__ == "__main__":
if options.l:
if not install.setLang(options.l):
sys.exit(1)
# set values to variables
if not install.setVars(options):
sys.exit(1)
# check and set installed options
if not options.live:
if not install.checkAndSetInstallOptions(options.d,options.w,options.b,
options.u):
sys.exit(1)
# set values to variables
if not install.setVars(options):
# refresh autoupdate
if not install.setAutoupdate(options):
sys.exit(1)
# print variables
if options.v or options.filter or options.xml:

Loading…
Cancel
Save