decode string before splitting it.
This commit is contained in:
		
							parent
							
								
									3b4875e38e
								
							
						
					
					
						commit
						8d3c1c59ad
					
				
					 1 changed files with 1 additions and 2 deletions
				
			
		| 
						 | 
					@ -722,8 +722,7 @@ class Logger:
 | 
				
			||||||
			#   ..., 'FEAT', feature1, feature2, ...).join(' '))
 | 
								#   ..., 'FEAT', feature1, feature2, ...).join(' '))
 | 
				
			||||||
			# NOTE: if there's a need to do more gzip, put that to a function
 | 
								# NOTE: if there's a need to do more gzip, put that to a function
 | 
				
			||||||
			try:
 | 
								try:
 | 
				
			||||||
				data = GzipFile(fileobj=StringIO(str(data))).read().split('\0')
 | 
									data = GzipFile(fileobj=StringIO(str(data))).read().decode('utf-8').split('\0')
 | 
				
			||||||
				data = data.decode('utf-8')
 | 
					 | 
				
			||||||
			except IOError:
 | 
								except IOError:
 | 
				
			||||||
				# This data is corrupted. It probably contains non-ascii chars
 | 
									# This data is corrupted. It probably contains non-ascii chars
 | 
				
			||||||
				to_be_removed.append((hash_method, hash))
 | 
									to_be_removed.append((hash_method, hash))
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		
		Reference in a new issue