uncloud cli converted to argparse

This commit is contained in:
ahmadbilalkhalid 2020-01-03 18:38:59 +05:00
commit 3296e524cc
13 changed files with 284 additions and 287 deletions

View file

@ -1,4 +1,5 @@
import os
import argparse
from flask import Flask, request
from flask_restful import Resource, Api
@ -12,6 +13,9 @@ api = Api(app)
app.logger.handlers.clear()
arg_parser = argparse.ArgumentParser('metadata', add_help=False)
arg_parser.add_argument('--port', '-p', default=80, help='By default bind to port 80')
@app.errorhandler(Exception)
def handle_exception(e):