1
0
Fork 0
mirror of https://gitlab.com/SIGBUS/nyaa.git synced 2024-12-22 13:09:59 +00:00

PEP8 api_handler.py (E265, E266)

E265 block comment should start with '# '
E266 too many leading '#' for block comment
This commit is contained in:
sharkykh 2017-05-14 10:37:12 +03:00 committed by Kfir Hadas
parent beb5be9989
commit b0325bc681

View file

@ -10,7 +10,7 @@ from orderedset import OrderedSet
from werkzeug import secure_filename from werkzeug import secure_filename
DEBUG_API = False DEBUG_API = False
#################################### API ROUTES #################################### # #################################### API ROUTES ####################################
CATEGORIES = [ CATEGORIES = [
('Anime', ['Anime Music Video', 'English-translated', 'Non-English-translated', 'Raw']), ('Anime', ['Anime Music Video', 'English-translated', 'Non-English-translated', 'Raw']),
('Audio', ['Lossless', 'Lossy']), ('Audio', ['Lossless', 'Lossy']),
@ -30,7 +30,7 @@ def validate_main_sub_cat(main_cat_name, sub_cat_name):
cat_id = main_cat.id_as_string cat_id = main_cat.id_as_string
sub_cat_id = sub_cat.id_as_string sub_cat_id = sub_cat.id_as_string
cat_sub_cat = sub_cat_id.split('_') cat_sub_cat = sub_cat_id.split('_')
#print('cat: {0} sub_cat: {1}'.format(cat_sub_cat[0], cat_sub_cat[1])) # print('cat: {0} sub_cat: {1}'.format(cat_sub_cat[0], cat_sub_cat[1]))
return True, cat_sub_cat[0], cat_sub_cat[1] return True, cat_sub_cat[0], cat_sub_cat[1]
@ -309,7 +309,7 @@ def api_upload(upload_request):
torrent_file.save(torrent_path) torrent_file.save(torrent_path)
torrent_file.close() torrent_file.close()
#print('Success? {0}'.format(torrent.id)) # print('Success? {0}'.format(torrent.id))
return flask.make_response(flask.jsonify({"Success": "Request was processed {0}".format(torrent.id)}), 200) return flask.make_response(flask.jsonify({"Success": "Request was processed {0}".format(torrent.id)}), 200)
except Exception as e: except Exception as e:
print('Exception: {0}'.format(e)) print('Exception: {0}'.format(e))