diff options
author | mkaay <mkaay@mkaay.de> | 2010-01-06 22:11:24 +0100 |
---|---|---|
committer | mkaay <mkaay@mkaay.de> | 2010-01-06 22:11:24 +0100 |
commit | d2aa3fceb9f896343b128d40f20a0465cf69efca (patch) | |
tree | a04d975938f19582b2afa2278107bd07e4c86ad4 /pyLoadCli.py | |
parent | cli fix, webinterface db check (diff) | |
download | pyload-d2aa3fceb9f896343b128d40f20a0465cf69efca.tar.xz |
small fixes, new hook stuff
Diffstat (limited to 'pyLoadCli.py')
-rwxr-xr-x | pyLoadCli.py | 31 |
1 files changed, 7 insertions, 24 deletions
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) |