fix a few things

master
Arinerron 2018-01-28 22:01:36 -08:00
parent 71bff27245
commit b3ea0e7b46
No known key found for this signature in database
GPG Key ID: 99383627861C62F0
3 changed files with 8 additions and 7 deletions

View File

@ -131,7 +131,7 @@ def log(prefix, data, color = ''):
Takes in input from the console, not stored in logs
message: The message to display before taking input
'''
def input(message = 'Enter input: '):
def readline(message = 'Enter input: '):
color = colors.fg.green + colors.bold
output = colors.reset + str(color) + '... ' + colors.reset + str(message) + colors.reset
@ -139,7 +139,8 @@ def input(message = 'Enter input: '):
output = colors.filter(output)
sys.stdout.write(output)
return raw_input()
return input()
'''
Displays an "Are you sure" message, returns True for Y and False for N
@ -163,7 +164,8 @@ def confirm(default = 'y', message = 'Are you sure %s? '):
output = colors.filter(output)
sys.stdout.write(output.replace('%s', confirm))
inp = raw_input().lower()
inp = input().lower()
if 'y' in inp:
return True

View File

@ -115,7 +115,7 @@ class Onionr:
logger.info(i)
elif command in ('addmsg', 'addmessage'):
while True:
messageToAdd = input('Broadcast message to network: ')
messageToAdd = logger.readline('Broadcast message to network: ')
if len(messageToAdd) >= 1:
break
addedHash = self.onionrCore.setData(messageToAdd)
@ -165,4 +165,4 @@ class Onionr:
def showHelp(self):
'''Show help for Onionr'''
return
Onionr()
Onionr()

View File

@ -50,7 +50,7 @@ class OnionrUtils:
pass2 = getpass.getpass()
if pass1 != pass2:
logger.error("Passwords do not match.")
input()
logger.readline()
else:
break
else:
@ -166,4 +166,3 @@ class OnionrUtils:
if not idNoDomain.isalnum():
retVal = False
return retVal