Skip to content

Commit 48e0815

Browse files
Update crawler_to_md/cli.py
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
1 parent ef6e96b commit 48e0815

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

crawler_to_md/cli.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,11 @@ def main():
178178
)
179179
if args.overwrite_cache and os.path.exists(db_path):
180180
logger.info(f"Removing existing cache database at {db_path}")
181-
os.remove(db_path)
181+
try:
182+
os.remove(db_path)
183+
except OSError as e:
184+
logger.error(f"Failed to remove cache database at {db_path}: {e}")
185+
sys.exit(1)
182186
db_manager = DatabaseManager(db_path)
183187
logger.info("DatabaseManager initialized.")
184188

0 commit comments

Comments
 (0)