# If user is specified but password is not
if options.user is not None and options.password is None:
try:
options.password = getpass()
except (EOFError, KeyboardInterrupt):
# If user is specified but password is not
if options.user is not None and options.password is None:
try:
options.password = getpass()
except (EOFError, KeyboardInterrupt):
elif shell.auth['AuthMethod'] == "session":
# XXX No way to tell node and user sessions apart from the
# client point of view.
prompt = "[%s]" % gethostname()
elif shell.auth['AuthMethod'] == "session":
# XXX No way to tell node and user sessions apart from the
# client point of view.
prompt = "[%s]" % gethostname()
- print "%s connected using %s authentication" % \
- (shell.auth['Username'], shell.auth['AuthMethod'])
+ print("%s connected using %s authentication" % \
+ (shell.auth['Username'], shell.auth['AuthMethod']))
readline.read_history_file(history_path)
atexit.register(readline.write_history_file, history_path)
except IOError:
readline.read_history_file(history_path)
atexit.register(readline.write_history_file, history_path)
except IOError: