Fix argument to modify port. (Thank you. roughnecks)

This commit is contained in:
Schimon Jehudah, Adv. 2024-11-17 18:12:01 +02:00
parent 524d4aff07
commit 09d50b9636

View file

@ -57,7 +57,7 @@ if __name__ == 'blasta.__main__':
parser.add_argument('-p', '--port', help='port number', dest='port') parser.add_argument('-p', '--port', help='port number', dest='port')
parser.add_argument('-o', '--open', help='open an html browser', action='store_const', const=True, dest='open') parser.add_argument('-o', '--open', help='open an html browser', action='store_const', const=True, dest='open')
args = parser.parse_args() args = parser.parse_args()
port = args.port or 8000 port = int(args.port or 8000)
uvicorn.run(app, host='localhost', port=port) uvicorn.run(app, host='localhost', port=port)
if args.open: if args.open:
# TODO Check first time # TODO Check first time