Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Less drama when displaying error message. #3

Merged
merged 6 commits into from Aug 20, 2013
@@ -51,9 +51,9 @@
STR_MULTIPLE_SYSLOG_MESSAGE = ("Multiple syslogd are running.")
STR_AUTHTOKEN_NOTFOUND_MESSAGE = ("No Customer Tokens were found.")
STR_AUTHENTICATION_FAIL_MESSAGE = ("Authentication fail for user %s")
VERIFICATION_FAIL_MESSAGE = ("!!!!!! Loggly verification failed."
VERIFICATION_FAIL_MESSAGE = ("Loggly verification failed. "
"Please contact support@loggly.com"
"for more information.")
" for more information.")
STR_EXIT_MESSAGE = ("\nThis environment (OS : %s) is not supported by "
"the Loggly Syslog Configuration Script. Please contact "
"support@loggly.com for more information.\n")
@@ -793,15 +793,15 @@ def get_auth_token(loggly_user, loggly_password, loggly_subdomain):
user_choice = 0
if len(auth_tokens) > 1:
Logger.printLog(("Multiple Customer Tokens"
"received from server."),
" received from server."),
print_comp = True)
for index in range(0, len(auth_tokens)):
Logger.printLog("\t%d. %s"%(index + 1, auth_tokens[index]),
print_comp = True)
for _ in range(0, 5):
try:
str_msg = ("Please select (1-" + str(index + 1) + ")"
"to specify which Customer Token"
"to specify which Customer Token "
"you want to use. (Default is 1): ")
user_choice = int(usr_input(str_msg)) - 1
if user_choice < 0 or user_choice > (index):
@@ -818,8 +818,8 @@ def get_auth_token(loggly_user, loggly_password, loggly_subdomain):
prio = 'warning', print_comp = True)
user_choice = 0
token = auth_tokens[user_choice]
Logger.printLog(('\nLoggly will be configured with '
'\"%s\" Customer Token.\n' % token),
Logger.printLog(('\nThis system is now configured to use '
'\"%s\" as its Customer Token.\n' % token),
print_comp = True)
return { "token" : token, "id": DISTRIBUTION_ID }
else:
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.