From 583f139f4411b06edf3b68fc63679a4d9e618346 Mon Sep 17 00:00:00 2001 From: spoob Date: Wed, 2 Sep 2009 13:19:43 +0200 Subject: cleaning --- pyLoadCli.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'pyLoadCli.py') diff --git a/pyLoadCli.py b/pyLoadCli.py index d01dc2280..2f94fb2ce 100755 --- a/pyLoadCli.py +++ b/pyLoadCli.py @@ -18,6 +18,7 @@ # ### import ConfigParser +import subprocess import os import os.path import sys @@ -315,8 +316,8 @@ def white(string): if __name__ == "__main__": - if len(sys.argv) == 2: - + if len(sys.argv) > 1: + shortOptions = 'l' longOptions = ['local'] @@ -330,13 +331,16 @@ if __name__ == "__main__": port = config.get("remote", "port") password = config.get("remote", "password") - elif len(sys.argv) != 4: + if len(extraparams) == 3: + address, port, password = sys.argv[1:4] + else: address = raw_input("Adress:") port = raw_input("Port:") password = raw_input("Password:") - else: - address, port, password = sys.argv[1:4] + print address + print port + print password cli = pyLoadCli(address, port, password) -- cgit v1.2.3