mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
safer setup.py check
This commit is contained in:
parent
9090d624b1
commit
21a524a513
@ -108,7 +108,10 @@ class Check(Command):
|
|||||||
self.info('\tChecking', f)
|
self.info('\tChecking', f)
|
||||||
if self.file_has_errors(f):
|
if self.file_has_errors(f):
|
||||||
self.info('%d files left to check' % (len(dirty_files) - i - 1))
|
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):
|
if self.file_has_errors(f):
|
||||||
raise SystemExit(1)
|
raise SystemExit(1)
|
||||||
cache[f] = self.file_hash(f)
|
cache[f] = self.file_hash(f)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user