client/tools/spacewalk-remote-utils/spacewalk-create-channel/spacewalk-create-channel | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
New commits: commit dc1dec14fdc3e377cbda465008535ed81f1898d5 Author: Andy Zaugg andy.zaugg@gmail.com Date: Fri Dec 20 12:04:53 2013 +0100
don't print traceback when entered incorrect credentials
diff --git a/client/tools/spacewalk-remote-utils/spacewalk-create-channel/spacewalk-create-channel b/client/tools/spacewalk-remote-utils/spacewalk-create-channel/spacewalk-create-channel index 1ffbf27..229c8fe 100755 --- a/client/tools/spacewalk-remote-utils/spacewalk-create-channel/spacewalk-create-channel +++ b/client/tools/spacewalk-remote-utils/spacewalk-create-channel/spacewalk-create-channel @@ -12,6 +12,7 @@ import getopt import sys import getpass from xmlrpclib import Server +from xmlrpclib import Fault import string import os from os import path @@ -170,7 +171,12 @@ def main(): client = Server(proto + "://" + server + "/rpc/api") if clone and client.api.getVersion() < 5.1: print "--clone cannot be used with a Satellite version older than 5.1" - auth = client.auth.login(user, password) + try: + auth = client.auth.login(user, password) + except Fault: + excInfo = sys.exc_info()[1] + print "\n %s " % excInfo.faultString + sys.exit(1)
skiplist = [] if options.skiplist:
spacewalk-commits@lists.fedorahosted.org