]> git.itanic.dy.fi Git - emerge-timer/commitdiff
Fix bug with packages with a special character in them
authorEsko Kokkonen <esko.kokkonen@gmail.com>
Tue, 16 Aug 2011 16:24:47 +0000 (19:24 +0300)
committerEsko Kokkonen <esko.kokkonen@gmail.com>
Tue, 16 Aug 2011 16:24:47 +0000 (19:24 +0300)
If a package had a '-' character in them, you weren't able to get a
current emerge time for it. This now fixes that using the list_all_packages()
function.

emerge-timer.py

index ea5c5fe746e3ac219e71a0d41812649f85e7f422..8d3d2b04b636a603ea403a42e798cc7d77f9a66e 100755 (executable)
@@ -293,6 +293,8 @@ def print_current_emerges(f, packages):
     """Print the current packages that are being merged with the
     current emerge time."""
 
+    all_packages = list_all_packages()
+
     print("Currently emerging: ")
 
     for p in packages:
@@ -303,10 +305,10 @@ def print_current_emerges(f, packages):
         print
 
 
-        name = (p[0].partition('-')[0] + '-' +
-                p[0].partition('-')[2].partition('-')[0])
+        for i in all_packages:
+            if i in p[0]:
+                main_loop(f, i, True)
 
-        main_loop(f, name, True)