From 5bdd0ddad4708c214aad2633af0e243bfa69f820 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ayrton=20Sau=C3=A9=20Cossuol?= Date: Tue, 6 Oct 2020 11:17:45 -0300 Subject: [PATCH] Update setup.py Verification when reading the file --- setup.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/setup.py b/setup.py index 660bad0..9d40d93 100644 --- a/setup.py +++ b/setup.py @@ -51,11 +51,14 @@ setup_args['install_requires'] = install_requires = [] with open('requirements.txt') as f: - for line in f.readlines(): - req = line.strip() - if not req or req.startswith(('-e', '#')): - continue - install_requires.append(req) + try: + for line in f.readlines(): + req = line.strip() + if not req or req.startswith(('-e', '#')): + continue + install_requires.append(req) + except: + print('File read failed.') def main():