use sys.stdin.readline() rather than input()

This commit is contained in:
Arinerron 2018-04-18 19:25:16 -07:00
parent 5dd0437f14
commit 620f176826
No known key found for this signature in database
GPG Key ID: 99383627861C62F0
2 changed files with 4 additions and 4 deletions

View File

@ -164,8 +164,8 @@ def readline(message = ''):
output = colors.filter(output) output = colors.filter(output)
sys.stdout.write(output) sys.stdout.write(output)
return input() return sys.stdin.readline()
def confirm(default = 'y', message = 'Are you sure %s? '): def confirm(default = 'y', message = 'Are you sure %s? '):
''' '''

View File

@ -93,7 +93,7 @@ class Onionr:
if os.path.exists('data/'): if os.path.exists('data/'):
break break
else: else:
logger.error('Failed to decrypt: ' + result[1]) logger.error('Failed to decrypt: ' + result[1], timestamp = False)
else: else:
if not os.path.exists('data/'): if not os.path.exists('data/'):
os.mkdir('data/') os.mkdir('data/')
@ -402,7 +402,7 @@ class Onionr:
Displays a "command not found" message Displays a "command not found" message
''' '''
logger.error('Command not found.') logger.error('Command not found.', timestamp = False)
def showHelpSuggestion(self): def showHelpSuggestion(self):
''' '''