logo

oasis

Own branch of Oasis Linux (upstream: <https://git.sr.ht/~mcf/oasis/>) git clone https://anongit.hacktivis.me/git/oasis.git
commit: 2a4f58810511ec8b00c1ba4689bad5750cb2debd
parent 001f7af9b5ce4bd05487be8c93dcdaaad94c876e
Author: Michael Forney <mforney@mforney.org>
Date:   Mon,  2 Dec 2019 21:15:01 -0800

scripts/outdated: Ignore directories with no `ver` file

Diffstat:

Mscripts/outdated.py7+++++--
1 file changed, 5 insertions(+), 2 deletions(-)

diff --git 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())