Skip to content

Commit

Permalink
Merge pull request #848 from Webperf-se/update-carbon-fix
Browse files Browse the repository at this point in the history
Update Carbon - Was unable to generate percentile
  • Loading branch information
7h3Rabbit authored Jan 10, 2025
2 parents 03429b5 + 642c0c7 commit 2c06f06
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion default.py
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,7 @@ def main(argv):
"cr=", "create-release=",
"dep", "dependency", "check-dependency",
"fus", "find-unknown-sources",
"update-carbon",
"update-carbon=",
"is=", "it=", "setting=", "save-setting="])
except getopt.GetoptError:
print(main.__doc__)
Expand Down
4 changes: 1 addition & 3 deletions helpers/carbon_rating_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,7 @@ def update_carbon_percentiles(argv):
generated_date = datetime.fromisoformat(
test[FIELD_INDEX_DATE]).strftime('%Y-%m-%d')

str_data = test[FIELD_INDEX_DATA].replace('\'', '"')
data = json.loads(str_data)
print(str_data)
data = test[FIELD_INDEX_DATA]
co2s.append(data['co2'])

if not generated_date:
Expand Down

0 comments on commit 2c06f06

Please sign in to comment.