forked from uncloud/uncloud
uncloud cli converted to argparse
This commit is contained in:
parent
50fb135726
commit
3296e524cc
13 changed files with 284 additions and 287 deletions
|
|
@ -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):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue