Skip to content

Commit

Permalink
Don't handle exception
Browse files Browse the repository at this point in the history
  • Loading branch information
theosanderson committed Feb 6, 2024
1 parent a96db9b commit 347bb22
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions kubernetes/config-processor/config-processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 347bb22

Please sign in to comment.