Merge branch 'process-blocks' of github.com:beardog108/onionr into process-blocks
This commit is contained in:
		
						commit
						40643358fc
					
				
					 3 changed files with 8 additions and 7 deletions
				
			
		|  | @ -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 | ||||
|  |  | |||
|  | @ -123,7 +123,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) | ||||
|  | @ -173,4 +173,4 @@ class Onionr: | |||
|     def showHelp(self): | ||||
|         '''Show help for Onionr''' | ||||
|         return | ||||
| Onionr() | ||||
| Onionr() | ||||
|  |  | |||
|  | @ -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 | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue