From d2aa3fceb9f896343b128d40f20a0465cf69efca Mon Sep 17 00:00:00 2001 From: mkaay Date: Wed, 6 Jan 2010 22:11:24 +0100 Subject: small fixes, new hook stuff --- pyLoadCli.py | 31 +++++++------------------------ 1 file changed, 7 insertions(+), 24 deletions(-) (limited to 'pyLoadCli.py') diff --git a/pyLoadCli.py b/pyLoadCli.py index 18efa7272..42ee5fbab 100755 --- a/pyLoadCli.py +++ b/pyLoadCli.py @@ -443,37 +443,20 @@ if __name__ == "__main__": config['remote']['listenaddr'], config['remote']['port'] ) - - if len(extraparams) == 4: - username, address, port, password = sys.argv[1:5] - - server_url = "http://%s:%s@%s:%s/" % ( - username, - password, - address, - port, - ) - + if len(extraparams) == 1: + server_url = sys.argv[1] else: username = raw_input("Username: ") address = raw_input("Adress: ") - port = raw_input("Port: ") - ssl = raw_input("Use SSL? (y/[n])") - if ssl == "y": + ssl = raw_input("Use SSL? ([y]/n): ") + if ssl == "y" or ssl == "": ssl = "s" else: ssl = "" - + port = raw_input("Port: ") from getpass import getpass password = getpass("Password: ") - server_url = "http%s://%s:%s@%s:%s/" % ( - ssl, - username, - password, - address, - port, - ) - - + server_url = "http%s://%s:%s@%s:%s/" % (ssl, username, password, address, port) + print server_url cli = pyLoadCli(server_url) -- cgit v1.2.3