Skip to content

Commit

Permalink
fix validation bug
Browse files Browse the repository at this point in the history
  • Loading branch information
henilp105 committed Jan 24, 2024
1 parent 546016c commit 95e95f1
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions backend/validate.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,12 @@ def process_package(packagename):

# Read fpm.toml
toml_path = f'static/temp/{packagename}/fpm.toml'
with open(toml_path, 'r') as file:
file_content = file.read()
parsed_toml = toml.loads(file_content)
try:
with open(toml_path, 'r') as file:
file_content = file.read()
parsed_toml = toml.loads(file_content) # handle toml parsing errors
except:
return False, None

# Clean up
cleanup_command = f'rm -rf static/temp/{packagename} static/temp/{packagename}.tar.gz'
Expand Down

1 comment on commit 95e95f1

@vercel
Copy link

@vercel vercel bot commented on 95e95f1 Jan 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checks for Deployment have failed

Please sign in to comment.