From 5e51ab56c9a72232ed745c0e7d6fc5727af556dc Mon Sep 17 00:00:00 2001 From: Dimitris Zlatanidis Date: Fri, 24 Jul 2015 05:47:47 +0300 Subject: [PATCH] Added message if no logs found --- slpkg/status_deps.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/slpkg/status_deps.py b/slpkg/status_deps.py index 36a4fe6b..894ca6cd 100644 --- a/slpkg/status_deps.py +++ b/slpkg/status_deps.py @@ -40,6 +40,8 @@ class DependenciesStatus(object): self.count_dep = 0 self.dep_path = self.meta.log_path + "dep/" self.logs = find_package("", self.dep_path) + if not self.logs: + self.no_logs() self.installed = find_package("", self.meta.pkg_path) def data(self): @@ -79,3 +81,11 @@ class DependenciesStatus(object): print("=" * 79) print("{0}Found {1} dependencies in {2} packages.{3}\n".format( grey, self.count_dep, self.count_pkg, endc)) + + def no_logs(self): + """Print message if no logs found + """ + print("\n There were no logs files. Obviously it wasn't used the \n" + " method of installation with the command: \n" + " '$ slpkg -s ' yet.\n") + raise SystemExit()