From 462cf09587e75e8502dfd0e149d1e19d79626a16 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sun, 20 Sep 2020 19:18:50 +0200 Subject: [PATCH] Fix issue about var 'conn' not being defined --- package_linter.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package_linter.py b/package_linter.py index 127a111..8475762 100755 --- a/package_linter.py +++ b/package_linter.py @@ -243,7 +243,8 @@ def urlopen(url): except urllib.error.HTTPError as e: return {'content': '', 'code': e.code} except urllib.error.URLError as e: - _print('URLError') + _print('Could not fetch %s : %s' % (url, e)) + return {'content': '', 'code': 0} return {'content': conn.read().decode('UTF8'), 'code': 200}