Update app.py
Browse files
app.py
CHANGED
@@ -239,7 +239,11 @@ def download_pdf(url, output_path):
|
|
239 |
return False
|
240 |
except Exception as e:
|
241 |
logger.error(f"An unexpected error occurred during download of {url}: {e}")
|
242 |
-
if os.path.exists(output_path):
|
|
|
|
|
|
|
|
|
243 |
return False
|
244 |
|
245 |
# (Keep process_pdf_snapshot - it doesn't use AI)
|
|
|
239 |
return False
|
240 |
except Exception as e:
|
241 |
logger.error(f"An unexpected error occurred during download of {url}: {e}")
|
242 |
+
if os.path.exists(output_path):
|
243 |
+
try:
|
244 |
+
os.remove(output_path)
|
245 |
+
except:
|
246 |
+
pass
|
247 |
return False
|
248 |
|
249 |
# (Keep process_pdf_snapshot - it doesn't use AI)
|