safer setup.py check

This commit is contained in:
un-pogaz 2024-12-15 13:17:48 +01:00
parent 9090d624b1
commit 21a524a513

View File

@ -108,7 +108,10 @@ class Check(Command):
self.info('\tChecking', f)
if self.file_has_errors(f):
self.info('%d files left to check' % (len(dirty_files) - i - 1))
edit_file(f)
try:
edit_file(f)
except FileNotFoundError:
pass # continue if the configured editor fail to be open
if self.file_has_errors(f):
raise SystemExit(1)
cache[f] = self.file_hash(f)