Package: command-not-found / 0.2.38-1

no-database.diff Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
--- a/CommandNotFound/CommandNotFound.py
+++ b/CommandNotFound/CommandNotFound.py
@@ -86,6 +86,9 @@ class CommandNotFound:
         self.components.reverse()
         for filename in os.listdir(os.path.sep.join([data_dir, self.programs_dir])):
             self.programs.append(ProgramDatabase(os.path.sep.join([data_dir, self.programs_dir, filename])))
+        if not self.programs:
+            print _("Could not find the database of available applications, "
+                    "run update-command-not-found as root to fix this")
         try:
             self.user_can_sudo = grp.getgrnam("admin")[2] in posix.getgroups()
         except KeyError: