update messages

This commit is contained in:
Dimitris Zlatanidis 2015-01-27 22:14:51 +02:00
parent 8ad7d42bd8
commit 7a20f846ed
3 changed files with 13 additions and 4 deletions

View file

@ -38,7 +38,8 @@ from slpkg.messages import (
msg_done,
reference,
msg_reading,
msg_resolving
msg_resolving,
msg_not_found,
)
from slpkg.utils import (
remove_dbs,
@ -95,8 +96,8 @@ class BinaryInstall(object):
(self.dwn, self.install, self.comp_sum,
self.uncomp_sum) = self.store(self.packages)
msg_done()
print("") # new line at start
if self.install:
print("") # new line at start
self.top_view()
print("Installing:")
mas_sum = self.views(self.install, self.comp_sum)
@ -130,7 +131,7 @@ class BinaryInstall(object):
write_deps(self.deps_dict)
delete(self.tmp_path, self.install)
else:
print('Not found packages for installation\n')
msg_not_found(self.if_upgrade)
except KeyboardInterrupt:
print("") # new line at exit
sys.exit(0)

View file

@ -112,6 +112,13 @@ def msg_pkg(count):
return message
def msg_not_found(if_upgrade):
if if_upgrade:
print('\nNot found packages for upgrade\n')
else:
print('\nNot found packages for installation\n')
def reference(install, upgrade):
'''
Reference list with packages installed

View file

@ -40,6 +40,7 @@ from slpkg.messages import (
reference,
msg_reading,
build_FAILED,
msg_not_found,
msg_resolving
)
from slpkg.__metadata__ import MetaData as _m
@ -144,7 +145,7 @@ class SBoInstall(object):
write_deps(self.deps_dict)
delete(_m.build_path)
else:
print('\nNot found packages for installation\n')
msg_not_found(if_upgrade)
except KeyboardInterrupt:
print("") # new line at exit
sys.exit(0)