From 347bb22c93196bed97afc3434fa15e6cf01a988b Mon Sep 17 00:00:00 2001 From: Theo Sanderson Date: Tue, 6 Feb 2024 23:32:40 +0000 Subject: [PATCH] Don't handle exception --- kubernetes/config-processor/config-processor.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/kubernetes/config-processor/config-processor.py b/kubernetes/config-processor/config-processor.py index ae3deae63..678f12d1b 100644 --- a/kubernetes/config-processor/config-processor.py +++ b/kubernetes/config-processor/config-processor.py @@ -16,12 +16,9 @@ def copy_structure(input_dir, output_dir): def replace_url_with_content(file_content): urls = re.findall(r'\[\[URL:(.*)\]\]', file_content) for url in urls: - try: - response = requests.get(url) - if response.status_code == 200: - file_content = file_content.replace(f"[[URL:{url}]]", response.text) - except requests.RequestException as e: - print(f"Error fetching {url}: {e}") + response = requests.get(url) + if response.status_code == 200: + file_content = file_content.replace(f"[[URL:{url}]]", response.text) return file_content def process_files(output_dir):