update set_var module
This commit is contained in:
parent
7b4414b137
commit
27bdbf5e4f
@ -41,16 +41,20 @@ def main():
|
|||||||
# import des fonctions communes de Zéphir client
|
# import des fonctions communes de Zéphir client
|
||||||
varc, valvar, save = argparser()
|
varc, valvar, save = argparser()
|
||||||
|
|
||||||
|
fh = open("/etc/eole/config.eol", 'r')
|
||||||
|
store = cjson.decode(fh.read(), all_unicode=True)
|
||||||
|
fh.close
|
||||||
|
|
||||||
if varc is None :
|
if varc is None :
|
||||||
|
print
|
||||||
|
print('Liste des variables modifiables :')
|
||||||
|
for var in store:
|
||||||
|
print(' - ' + var)
|
||||||
varc = raw_input("Variable à modifier : ")
|
varc = raw_input("Variable à modifier : ")
|
||||||
|
|
||||||
if valvar is None :
|
if valvar is None :
|
||||||
valvar = raw_input("Valeur de la variable : ")
|
valvar = raw_input("Valeur de la variable : ")
|
||||||
|
|
||||||
fh = open("/etc/eole/config.eol", 'r')
|
|
||||||
store = cjson.decode(fh.read(), all_unicode=True)
|
|
||||||
fh.close
|
|
||||||
if varc in store:
|
if varc in store:
|
||||||
if "|" in valvar:
|
if "|" in valvar:
|
||||||
valvar = valvar.split("|")
|
valvar = valvar.split("|")
|
||||||
|
Loading…
Reference in New Issue
Block a user