Skip to content

Commit 520bfaa

Browse files
committed
No tracebacks for normal OS errors
1 parent 720b068 commit 520bfaa

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

latextools/utils/cache.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -440,15 +440,14 @@ def save(self, key=None):
440440
shutil.rmtree(self.cache_path)
441441
except OSError as e:
442442
logger.error("error while deleting %s: %s", self.cache_path, e)
443-
traceback.print_exc()
443+
444444
elif key in _objs:
445445
if _objs[key] == _invalid_object:
446446
file_path = os.path.join(self.cache_path, key)
447447
try:
448448
os.remove(file_path)
449449
except OSError as e:
450450
logger.error("error while deleting %s: %s", file_path, e)
451-
traceback.print_exc()
452451
else:
453452
os.makedirs(self.cache_path, exist_ok=True)
454453
self._write(key, _objs)
@@ -473,7 +472,6 @@ def _write(self, key, obj):
473472
pickle.dump(_obj, f, protocol=-1)
474473
except OSError as e:
475474
logger.error("error while writing to %s: %s", key, e)
476-
traceback.print_exc()
477475
raise CacheMiss()
478476

479477
def _schedule_save(self):

0 commit comments

Comments
 (0)