From 3735e88e51bcc8be98d1a95c16a67a394caf1047 Mon Sep 17 00:00:00 2001 From: Anthony Ilinykh Date: Tue, 12 Dec 2023 06:52:11 +0300 Subject: [PATCH] Handle "File not found." artifactory response as OSError (#438) * Handle "File not found." artifactory response as OSError Fix for #437 * Apply suggestions from code review Co-authored-by: Anthony Ilinykh --------- Co-authored-by: Alex --- artifactory.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/artifactory.py b/artifactory.py index 12a51f1..c93e660 100755 --- a/artifactory.py +++ b/artifactory.py @@ -877,7 +877,7 @@ def get_stat_json(self, pathobj, key=None): ) code = response.status_code text = response.text - if code == 404 and ("Unable to find item" in text or "Not Found" in text): + if code == 404 and ("Unable to find item" in text or "Not Found" in text or "File not found" in text): raise OSError(2, f"No such file or directory: {url}") raise_for_status(response)