Skip to content
This repository has been archived by the owner on Apr 5, 2022. It is now read-only.

Commit

Permalink
Fix unnecessary "else" after "return" (again)
Browse files Browse the repository at this point in the history
  • Loading branch information
BBaoVanC committed Jan 25, 2021
1 parent fec6100 commit e0325f6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
6 changes: 3 additions & 3 deletions imgupload.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,9 @@ def upload():
'name' : fname, # filename
'uploadedName' : f.filename, # name that was uploaded
}), status.HTTP_201_CREATED
else: # if the extension was invalid
print("Uploaded extension is invalid!")
return jsonify({'status': 'error', 'error': 'INVALID_EXTENSION'}), status.HTTP_415_UNSUPPORTED_MEDIA_TYPE
# if the extension was invalid
print("Uploaded extension is invalid!")
return jsonify({'status': 'error', 'error': 'INVALID_EXTENSION'}), status.HTTP_415_UNSUPPORTED_MEDIA_TYPE

else: # if the key was not valid
print("Key is invalid!")
Expand Down
3 changes: 1 addition & 2 deletions keyctl.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,7 @@ def rmkey(delkey):

if removedkey:
return True
else:
return False
return False


def find_duplicates():
Expand Down

0 comments on commit e0325f6

Please sign in to comment.