Skip to content

Commit

Permalink
check_urls - removed unnecessary code and comments
Browse files Browse the repository at this point in the history
  • Loading branch information
hofiorg committed Mar 15, 2024
1 parent b9efdfe commit 6b51d5c
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions scripts/check_urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,11 @@ def check_urls(url_data):
and print the result using emojis.
"""
if 'urls' in url_data:
if not url_data['urls']: # Check if the list is empty
if not url_data['urls']:
print("No URLs to check.")
return
if url_data['urls']:
max_name_length = max(len(item['name']) for item in url_data['urls'])
else:
max_name_length = 0 # or some default value that makes sense for your use case


for item in url_data['urls']:
name = item['name']
Expand Down Expand Up @@ -71,5 +68,4 @@ def check_urls(url_data):
json_file_path = sys.argv[1]
json_data = read_json_file(json_file_path)

# Check URLs
check_urls(json_data)

0 comments on commit 6b51d5c

Please sign in to comment.