From b43191241e1e74887ce59b377ff1059743a58b6f Mon Sep 17 00:00:00 2001 From: Doug Hellmann Date: Wed, 26 Sep 2018 18:37:22 -0400 Subject: [PATCH] handle errors in fix_one() Change-Id: I1b999f3f20c69ae4a004e3e70b9cb63187f5b702 Signed-off-by: Doug Hellmann --- goal_tools/python3_first/toxsettings.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/goal_tools/python3_first/toxsettings.py b/goal_tools/python3_first/toxsettings.py index 40bd01d..39d8936 100644 --- a/goal_tools/python3_first/toxsettings.py +++ b/goal_tools/python3_first/toxsettings.py @@ -249,7 +249,11 @@ class ToxFixMissingPy3(command.Command): shutil.rmtree(os.path.join(team_dir, r)) continue - fix_one(team_dir, r, bad_envs) + try: + fix_one(team_dir, r, bad_envs) + except Exception: + LOG.exception('failed to update {}'.format(r)) + continue LOG.info('adding %s to %s', r, tracking_file) with open(tracking_file, 'a', encoding='utf-8') as f: