ENH make system display n/a when no pacman stats available

This commit is contained in:
Nathan Dwarshuis 2019-10-13 21:14:08 -04:00
parent b1ad4fcfa7
commit f5dae615f5
1 changed files with 3 additions and 0 deletions

View File

@ -59,6 +59,9 @@ local draw_dynamic = function(cr, pacman_stats)
local last_update, last_sync = __string_match(pacman_stats, "^%d+%s+([^%s]+)%s+([^%s]+).*") local last_update, last_sync = __string_match(pacman_stats, "^%d+%s+([^%s]+)%s+([^%s]+).*")
TextColumn.set(info, cr, 2, last_update) TextColumn.set(info, cr, 2, last_update)
TextColumn.set(info, cr, 3, last_sync) TextColumn.set(info, cr, 3, last_sync)
else
TextColumn.set(info, cr, 2, "N/A")
TextColumn.set(info, cr, 3, "N/A")
end end
TextColumn.draw(info, cr) TextColumn.draw(info, cr)