Commit 2ff4f099 authored by Thonier Florian's avatar Thonier Florian
Browse files

api_demo.py; Allow to fill user and password value with hidden field into console

parent 9e56c281
Pipeline #717510 passed with stages
in 1 minute and 29 seconds
......@@ -2,6 +2,7 @@
from api_vidjil import Vidjil
import argparse
import os
import getpass
TAGS = []
TAGS_UNDEFINED = []
......@@ -157,6 +158,21 @@ if __name__ =='__main__':
if not args.public and not args.local:
parser.print_help()
if (args.stress or args.public):
if PUBLIC_USER == "":
PUBLIC_USER = input("Enter public login user:")
if PUBLIC_PASSWORD == "":
print( "Attempted to log as '%s' on public server" % PUBLIC_USER)
PUBLIC_PASSWORD = getpass.getpass("Password for public server:")
if args.local:
if LOCAL_USER == "":
LOCAL_USER = input("Enter local login user:")
if LOCAL_PASSWORD == "":
print( "Attempted to log as '%s' on local server" % LOCAL_USER)
LOCAL_PASSWORD = getpass.getpass("Password for local server:")
if args.stress:
failures = 0
total = 20
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment