Merge pull request #333 from terminalmage/fix-updates

Fix KeyError when using backend-specific updates formatter
This commit is contained in:
enkore 2016-03-22 12:31:48 +01:00
commit 0b49c4058a

View File

@ -92,6 +92,11 @@ class Updates(Module):
@require(internet)
def check_updates(self):
for backend in self.backends:
key = backend.__class__.__name__
if key not in self.data:
self.data[key] = '?'
self.output = {
"full_text": formatp(self.format_working, **self.data).strip(),
"color": self.color_working,