bu son.
This commit is contained in:
@@ -54,23 +54,17 @@ def show_changes(package, changed):
|
|||||||
return
|
return
|
||||||
|
|
||||||
for file in changed:
|
for file in changed:
|
||||||
|
answer = "?"
|
||||||
|
while answer == "?" or answer not in ["n", "y"]:
|
||||||
prompt = " %s has changed. Would you like to overwrite new config file [N/y/?] " % file
|
prompt = " %s has changed. Would you like to overwrite new config file [N/y/?] " % file
|
||||||
answer = ask_action(prompt, ["y", "n", "?"], "n")
|
answer = ask_action(prompt, ["y", "n", "?"], "n")
|
||||||
|
|
||||||
if answer == "y":
|
if answer == "y":
|
||||||
os.rename(file+".newconfig", file)
|
os.rename(file+".newconfig", file)
|
||||||
if answer == "n":
|
if answer == "n":
|
||||||
continue
|
break
|
||||||
|
if answer == "?":
|
||||||
while answer == "?":
|
|
||||||
os.system("diff -u %s %s | less" % (file, file + ".newconfig"))
|
os.system("diff -u %s %s | less" % (file, file + ".newconfig"))
|
||||||
answer = ask_action(prompt, ["y", "n", "?"], "n")
|
|
||||||
|
|
||||||
if answer == "y":
|
|
||||||
os.rename(file+".newconfig", file)
|
|
||||||
break
|
|
||||||
if answer == "n":
|
|
||||||
break
|
|
||||||
|
|
||||||
def check_package(package):
|
def check_package(package):
|
||||||
changed = check_changed_config_files(package)
|
changed = check_changed_config_files(package)
|
||||||
|
|||||||
Reference in New Issue
Block a user