From 2a4f58810511ec8b00c1ba4689bad5750cb2debd Mon Sep 17 00:00:00 2001 From: Michael Forney Date: Mon, 2 Dec 2019 21:15:01 -0800 Subject: scripts/outdated: Ignore directories with no `ver` file --- scripts/outdated.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'scripts') diff --git a/scripts/outdated.py b/scripts/outdated.py index a6dd3ef3..ceb02100 100644 --- a/scripts/outdated.py +++ b/scripts/outdated.py @@ -40,8 +40,11 @@ for line in p.stdout: if fields[1] != 'tree' or fields[3] in skip: continue name = fields[3] - with open('pkg/{}/ver'.format(name), 'r') as f: - oldver = f.read().rsplit(maxsplit=1)[0] + try: + with open('pkg/{}/ver'.format(name), 'r') as f: + oldver = f.read().rsplit(maxsplit=1)[0] + except FileNotFoundError: + continue proj = names.get(name, name) with urllib.request.urlopen('https://repology.org/api/v1/project/{}'.format(proj)) as response: pkgs = json.loads(response.read()) -- cgit v1.2.3