Update the messages and fix typo

Signed-off-by: Dimitris Zlatanidis <d.zlatanidis@gmail.com>
This commit is contained in:
Dimitris Zlatanidis 2018-04-17 20:52:41 +02:00
parent 981bdb6b78
commit f0e6dd4ca7
9 changed files with 26 additions and 25 deletions

View file

@ -53,7 +53,7 @@ class BlackList(object):
def listed(self):
"""Print blacklist packages
"""
print("\nPackages in blacklist:\n")
print("\nPackages in the blacklist:\n")
for black in self.get_black():
if black:
print("{0}{1}{2}".format(self.meta.color["GREEN"], black,
@ -67,7 +67,7 @@ class BlackList(object):
"""
blacklist = self.get_black()
pkgs = set(pkgs)
print("\nAdd packages in blacklist:\n")
print("\nAdd packages in the blacklist:\n")
with open(self.blackfile, "a") as black_conf:
for pkg in pkgs:
if pkg not in blacklist:
@ -82,7 +82,7 @@ class BlackList(object):
def remove(self, pkgs):
"""Remove packages from blacklist
"""
print("\nRemove packages from blacklist:\n")
print("\nRemove packages from the blacklist:\n")
with open(self.blackfile, "w") as remove:
for line in self.black_conf.splitlines():
if line not in pkgs:

View file

@ -99,8 +99,8 @@ class ArgParse(object):
"-F", "--FIND",
"-f", "--find"
] and self.args[1] == repo and repo in enabled_repos:
print("\n Please update packages lists. Run 'slpkg update'.\n" +
" This command should be used to synchronize packages\n" +
print("\n Please update the packages lists. Run 'slpkg update'.\n"
" This command should be used to synchronize the packages\n"
" lists from the repositories are enabled.\n")
raise SystemExit()

View file

@ -56,9 +56,9 @@ class Msg(object):
print("| Some error on the package {0} [ {1}FAILED{2} ]".format(
prgnam, self.meta.color["RED"], self.meta.color["ENDC"]))
self.template(78)
print("| See log file in '{0}/var/log/slpkg/sbo/build_logs{1}' "
"directory or read README".format(self.meta.color["CYAN"],
self.meta.color["ENDC"]))
print("| See the log file in '{0}/var/log/slpkg/sbo/build_logs{1}' "
"directory or read the README file".format(
self.meta.color["CYAN"], self.meta.color["ENDC"]))
self.template(78)
print("") # new line at end
@ -139,9 +139,9 @@ class Msg(object):
print("| {0}{1}*** WARNING ***{2}").format(
" " * 27, self.meta.color["RED"], self.meta.color["ENDC"])
self.template(78)
print("| Before proceed with package '{0}' will you must read the\n"
"| README file. You can use command 'slpkg -n {1}'").format(
pkg, pkg)
print("| Before proceed with the package '{0}' will you must read\n"
"| the README file. You can use the command "
"'slpkg -n {1}'").format(pkg, pkg)
self.template(78)
print("")

View file

@ -108,7 +108,7 @@ class BuildPackage(object):
sum_time = build_time(self.start_time)
# write end in log file
log_end(self.build_logs, self.log_file, sum_time)
print("Total build time for package {0} : {1}\n".format(
print("Total build time for the package {0} : {1}\n".format(
self.prgnam, sum_time))
else:
subprocess.call("{0} ./{1}.SlackBuild".format(

View file

@ -185,7 +185,7 @@ class PackageManager(object):
removed, packages = self._get_removed()
if packages and "--checklist" in self.extra:
removed = []
text = "Press 'spacebar' to unchoose packages from remove"
text = "Press 'spacebar' to unchoose packages from the remove"
backtitle = "{0} {1}".format(self.meta.__all__,
self.meta.__version__)
status = True
@ -239,7 +239,7 @@ class PackageManager(object):
if packages:
if "--checklist" in self.extra:
deps, dependencies = [], []
text = "Found dependencies for package {0}".format(package)
text = "Found dependencies for the package {0}".format(package)
backtitle = "{0} {1}".format(self.meta.__all__,
self.meta.__version__)
status = True
@ -251,7 +251,8 @@ class PackageManager(object):
else:
print("") # new line at start
self.msg.template(78)
print("| Found dependencies for package {0}:".format(package))
print("| Found dependencies for the package {0}:".format(
package))
self.msg.template(78)
for pkg in packages:
find = find_package(pkg + self.meta.sp, self.meta.pkg_path)
@ -333,8 +334,8 @@ class PackageManager(object):
dependency.append(rmv)
if package:
if "--checklist" in self.extra:
text = ("Press 'spacebar' to choose packages to exception "
"remove")
text = ("Press 'spacebar' to choose packages for the remove"
" exception")
backtitle = "{0} {1}".format(self.meta.__all__,
self.meta.__version__)
status = False

View file

@ -70,7 +70,7 @@ class RepoList(object):
print("=" * 79)
print("{0}{1}/{2} enabled default repositories and {3} custom.".format(
self.meta.color["GREY"], def_cnt, len(self.all_repos), cus_cnt))
print("For enable or disable default repositories edit "
"'/etc/slpkg/repositories.conf'\nfile or run 'slpkg "
print("Edit the file '/etc/slpkg/repositories.conf' for enable "
"and disable default\nrepositories or run 'slpkg "
"repo-enable' command.\n{0}".format(self.meta.color["ENDC"]))
raise SystemExit()

View file

@ -79,7 +79,7 @@ class QueuePkgs(object):
def listed(self):
"""Print packages from queue
"""
print("\nPackages in queue:\n")
print("\nPackages in the queue:\n")
for pkg in self.packages():
if pkg:
print("{0}{1}{2}".format(self.meta.color["GREEN"], pkg,
@ -93,7 +93,7 @@ class QueuePkgs(object):
"""
queue_list = self.packages()
pkgs = list(OrderedDict.fromkeys(pkgs))
print("\nAdd packages in queue:\n")
print("\nAdd packages in the queue:\n")
with open(self.queue_list, "a") as queue:
for pkg in pkgs:
find = sbo_search_pkg(pkg)
@ -113,7 +113,7 @@ class QueuePkgs(object):
def remove(self, pkgs):
"""Remove packages from queue
"""
print("\nRemove packages from queue:\n")
print("\nRemove packages from the queue:\n")
with open(self.queue_list, "w") as queue:
for line in self.queued.splitlines():
if line not in pkgs:

View file

@ -272,8 +272,8 @@ class Patches(object):
"""Update packages list and ChangeLog.txt file after
upgrade distribution
"""
print("{0}Update package lists ?{1}".format(self.meta.color["GREEN"],
self.meta.color["ENDC"]))
print("{0}Update the package lists ?{1}".format(
self.meta.color["GREEN"], self.meta.color["ENDC"]))
print("=" * 79)
if self.msg.answer() in ["y", "Y"]:
Update().repository(["slack"])

View file

@ -59,7 +59,7 @@ class URL(object):
f = urllib2.urlopen(self.link)
return f.read()
except (urllib2.URLError, ValueError):
print("\n{0}Can't read file '{1}'{2}".format(
print("\n{0}Can't read the file '{1}'{2}".format(
self.meta.color["RED"], self.link.split("/")[-1],
self.meta.color["ENDC"]))
return " "