mirror of
				https://github.com/Thor77/TeamspeakStats.git
				synced 2025-11-04 07:42:44 -05:00 
			
		
		
		
	Fix parse_logs-run not returning server with cache
because the filter-object will get evaluated (and is empty afterwards) when caching it. To fix this, it's now evaluated onece (converting it into a list) and the resulting list can be accessed multiple times without "destroying" it.
This commit is contained in:
		
							parent
							
								
									af608f175f
								
							
						
					
					
						commit
						f6e3f9566b
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
					@ -149,7 +149,7 @@ def parse_logs(log_glob, ident_map=None, online_dc=True, cache_path=None):
 | 
				
			||||||
                else:
 | 
					                else:
 | 
				
			||||||
                    # parse logfile line by line
 | 
					                    # parse logfile line by line
 | 
				
			||||||
                    # and filter lines without events
 | 
					                    # and filter lines without events
 | 
				
			||||||
                    events = filter(None, map(_parse_line, f))
 | 
					                    events = list(filter(None, map(_parse_line, f)))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                    # cache parsed events
 | 
					                    # cache parsed events
 | 
				
			||||||
                    if cache is not None:
 | 
					                    if cache is not None:
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		
		Reference in a new issue