diff --git a/check_xbps.py b/check_xbps.py index 5dcee10..b59c9d0 100755 --- a/check_xbps.py +++ b/check_xbps.py @@ -140,7 +140,7 @@ elif rc not in [0, 6]: # RC 6: Package(s) already installed plugin.back2nagios(plugin.RETURNCODE['WARNING'], 'Unknown returncode "%s", please contact the author of plugin or open an issue!' % rc) -action = {'remove':[], 'update':[], 'install':[],} +action = {'remove':[], 'update':[], 'install':[], 'configure':[]} arch = {} repo = {} downby = 0L @@ -176,13 +176,13 @@ if len(sout) == 0: else: out = [] multiline = [] - for act in ['update', 'install', 'remove']: + for act in ['update', 'install', 'remove', 'configure']: pkgs = action.pop(act) pkgs.sort() l = len(pkgs) out.append('%s package%s to %s' % (l, l != 1 and 's' or '', act) ) l and multiline.append('%s(%s): %s' % (act, l, ', '.join(pkgs)) ) - for act in action: + for act in action.keys(): pkgs = action.pop(act) pkgs.sort() l = len(pkgs)