]> git.itanic.dy.fi Git - emerge-timer/commitdiff
list_pretended: Abort if there are no packages
authorEsko Kokkonen <esko.kokkonen@gmail.com>
Tue, 16 Aug 2011 16:59:34 +0000 (19:59 +0300)
committerEsko Kokkonen <esko.kokkonen@gmail.com>
Tue, 16 Aug 2011 16:59:34 +0000 (19:59 +0300)
Exit the program if no usable packages are found

emerge-timer.py

index 1b5bb63e03436b97cae7a68a4d30119033d6b5e4..e195fbca727afd4aeecf64bd512fd0c2e9cf47c7 100755 (executable)
@@ -326,6 +326,8 @@ def list_pretended(f):
                 if i in full_name:
                     packages.append((i, full_name[len(i):]))
 
+    if len(packages) == 0:
+        return
 
     print "This is how long these packages would take to emerge"