Skip to content

Commit 160fe82

Browse files
authored
fix fetch (#78)
1 parent 513c92c commit 160fe82

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

scripts/parse_and_validate_properties_txt.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,9 @@ def read_properties_txt(properties_url):
7272

7373
return r.text
7474

75+
def parse_text(properties_raw):
76+
return jp.loads(properties_raw)
77+
7578
def validate_existing(properties_dict):
7679
# validation on existing contribution is weaker
7780
properties = PropertiesExisting.model_validate(properties_dict)
@@ -126,9 +129,9 @@ def set_output_error(msg):
126129

127130
try:
128131
if type_ == 'library':
129-
props = validate_new_library(jp.loads(properties_raw))
132+
props = validate_new_library(parse_text(properties_raw))
130133
else:
131-
props = validate_new(jp.loads(properties_raw))
134+
props = validate_new(parse_text(properties_raw))
132135
except Exception as e:
133136
set_output_error(f'Errors when parsing file. Please check all required fields, and file format.\n\n{e}')
134137
raise e

0 commit comments

Comments
 (0)