dotfiles

🎜 Clone'em, tweak'em, stick'em in your $HOME 🎝
git clone https://git.kevinlegouguec.net/dotfiles
Log | Files | Refs | README

commit 7c1985a077321b8085ad87009674c74c10689912
parent 3593f50aedce5544e7a03e85421ea4b9c1752462
Author: KΓ©vin Le Gouguec <kevin.legouguec@gmail.com>
Date:   Tue, 14 Apr 2020 18:46:54 +0200

Exit gracefully when there are no updates

Diffstat:
M.local/bin/zypper-wassup | 6+++++-
1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/.local/bin/zypper-wassup b/.local/bin/zypper-wassup @@ -26,7 +26,8 @@ SOURCERPM_PATTERN = re.compile( '-'.join(('(?P<name>.+)', '(?P<version>[^-]+)', '(?P<release>[^-]+)')), '(?:no)?src', 'rpm' -))) + )) +) def execute(command): @@ -127,6 +128,9 @@ def main(): packages = zypper_list_updates() print(f'{len(packages)} updates.') + if not packages: + return + widths = { field: max(len(p._asdict()[field]) for p in packages) for field in Package._fields