From 68b50b8504c9ad655af779afd118bd068997f961 Mon Sep 17 00:00:00 2001 From: Geoffrey Frogeye Date: Wed, 3 Feb 2016 19:11:54 +0100 Subject: [PATCH] locinst.py: a bit better --- scripts/locinst.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/locinst.py b/scripts/locinst.py index c319152..d0b75ea 100755 --- a/scripts/locinst.py +++ b/scripts/locinst.py @@ -15,8 +15,8 @@ DEBIAN_MIRROR = 'http://debian.polytech-lille.fr/debian/' def globallyInstalled(name): try: - a = subprocess.check_output(['apt-cache', 'policy', 'name']).decode('utf8').strip().lower() - return 'Installed: (none)' not in [b.strip() for b in a.decode('utf8').split('\n')] + a = subprocess.check_output(['apt-cache', 'policy', name]).decode('utf8').strip().lower() + return 'installé\xa0: (aucun)' not in [b.strip() for b in a.split('\n')] except FileNotFoundError: return False