From b462d9893ff5780626ff14ddea0b66bcf55222f1 Mon Sep 17 00:00:00 2001 From: kewl fft Date: Thu, 11 Apr 2019 19:05:57 +0100 Subject: [PATCH] improved error message when pkg not found thanks @juergenhoetzel --- aur.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aur.py b/aur.py index 73f300c..50b39a5 100644 --- a/aur.py +++ b/aur.py @@ -109,7 +109,7 @@ def check_packages(module, packages): if would_be_changed: status = True if (len(packages) > 1): - message = '%s package(s) would be installed' % str(len(would_be_changed)) + message = '{} package(s) would be installed'.format(len(would_be_changed)) else: message = 'package would be installed' else: @@ -129,7 +129,7 @@ def install_with_makepkg(module, package): f = open_url('https://aur.archlinux.org/rpc/?v=5&type=info&arg={}'.format(package)) result = json.loads(f.read().decode('utf8')) if result['resultcount'] != 1: - return (1, '', 'package not found') + return (1, '', 'package {} not found'.format(package)) result = result['results'][0] f = open_url('https://aur.archlinux.org/{}'.format(result['URLPath'])) current_path = os.getcwd()