bugfix: index fact list properly
This commit is contained in:
		
							parent
							
								
									632f89e61c
								
							
						
					
					
						commit
						f7cb0fd05a
					
				| @ -44,7 +44,7 @@ class FactFile(Module): | ||||
|                 # http://www.regexprn.com/2008/11/read-random-line-in-large-file-in.html | ||||
|                 with open(filename, 'r') as file: | ||||
|                     facts = file.readlines() | ||||
|                 to_print = facts[random.randint(0, len(facts))] | ||||
|                 to_print = facts[random.randint(1, len(facts))-1] | ||||
| 
 | ||||
|                 # return text | ||||
|                 if replypath is None: | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user