Skip to content

Commit

Permalink
fix console keys upload
Browse files Browse the repository at this point in the history
  • Loading branch information
a1ex4 committed Nov 5, 2023
1 parent 02a836c commit bec4a52
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions app/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,16 +119,15 @@ def upload_file():
# filename = secure_filename(file.filename)
file.save(KEYS_FILE + '.tmp')
print(f'Validating {file.filename}...')
valid, invalid_keys = validate_keys(KEYS_FILE + '.tmp')
valid = validate_keys(KEYS_FILE + '.tmp')
if valid:
os.rename(KEYS_FILE + '.tmp', KEYS_FILE)
success = True
print('Successfully saved valid keys.txt')
reload_conf()
else:
os.remove(KEYS_FILE + '.tmp')
errors = invalid_keys
print('Invalid keys from keys.txt: ' + ', '.join(invalid_keys))
print(f'Invalid keys from {file.filename}')

resp = {
'success': success,
Expand Down

0 comments on commit bec4a52

Please sign in to comment.