Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def post(self):
- try:
- conn = None
- parser = reqparse.RequestParser()
- parser.add_argument('username', type = str)
- args = parser.parse_args()
- name = args['username'][0]
- return name
- except Exception as e:
- x = str(e)
- x.replace('n', '')
- return {'status' : 'failed', 'message' : str(x)}
- finally:
- if conn is not None:
- conn.close()
Add Comment
Please, Sign In to add comment