mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2025-01-15 03:41:16 +01:00
Fix message question capital letter
This commit is contained in:
parent
32d343067e
commit
14cf485c71
5 changed files with 9 additions and 9 deletions
|
@ -129,10 +129,10 @@ class Msg(object):
|
|||
def answer(self):
|
||||
"""Message answer
|
||||
"""
|
||||
if self.meta.default_answer == "y":
|
||||
if self.meta.default_answer in ["y", "Y"]:
|
||||
answer = self.meta.default_answer
|
||||
else:
|
||||
answer = raw_input("Would you like to continue [Y/n]? ")
|
||||
answer = raw_input("Would you like to continue [y/N]? ")
|
||||
return answer
|
||||
|
||||
def reference(self, install, upgrade):
|
||||
|
|
|
@ -89,11 +89,11 @@ class PackageManager(object):
|
|||
if len(self.removed) > 1:
|
||||
msg = msg + "s"
|
||||
try:
|
||||
if self.meta.default_answer == "y":
|
||||
if self.meta.default_answer in ["y", "Y"]:
|
||||
remove_pkg = self.meta.default_answer
|
||||
else:
|
||||
remove_pkg = raw_input(
|
||||
"\nAre you sure to remove {0} {1} [Y/n]? ".format(
|
||||
"\nAre you sure to remove {0} {1} [y/N]? ".format(
|
||||
str(len(self.removed)), msg))
|
||||
except KeyboardInterrupt:
|
||||
print("") # new line at exit
|
||||
|
@ -120,13 +120,13 @@ class PackageManager(object):
|
|||
def _rmv_deps_answer(self):
|
||||
"""Remove dependencies answer
|
||||
"""
|
||||
if self.meta.remove_deps_answer == "y":
|
||||
if self.meta.remove_deps_answer in ["y", "Y"]:
|
||||
remove_dep = self.meta.remove_deps_answer
|
||||
else:
|
||||
try:
|
||||
remove_dep = raw_input(
|
||||
"\nRemove dependencies (maybe used by "
|
||||
"other packages) [Y/n]? ")
|
||||
"other packages) [y/N]? ")
|
||||
print("")
|
||||
except KeyboardInterrupt:
|
||||
print("") # new line at exit
|
||||
|
|
|
@ -191,4 +191,4 @@ class Repo(object):
|
|||
"""
|
||||
MSB mate repository
|
||||
"""
|
||||
return ("http://slackware.org.uk/msb/")
|
||||
return "http://slackware.org.uk/msb/"
|
||||
|
|
|
@ -211,7 +211,7 @@ class Patches(object):
|
|||
self.meta.color["ENDC"]))
|
||||
Msg().template(78)
|
||||
answer = raw_input("\nThe kernel has been upgraded, "
|
||||
"reinstall `LILO` [Y/n]? ")
|
||||
"reinstall `LILO` [y/N]? ")
|
||||
if answer in ["y", "Y"]:
|
||||
subprocess.call("lilo", shell=True)
|
||||
break
|
||||
|
|
|
@ -58,7 +58,7 @@ def it_self_update():
|
|||
else:
|
||||
print("\nNew version '{0}-{1}' is available !\n".format(
|
||||
_meta_.__all__, __new_version__))
|
||||
answer = raw_input("Would you like to upgrade [Y/n]? ")
|
||||
answer = raw_input("Would you like to upgrade [y/N]? ")
|
||||
if answer in ["y", "Y"]:
|
||||
print("") # new line after answer
|
||||
else:
|
||||
|
|
Loading…
Reference in a new issue