Rewrite helpers.comma_space_split with a simple regex.
This commit is contained in:
		
							parent
							
								
									348215a8ee
								
							
						
					
					
						commit
						a8fa621f01
					
				
					 1 changed files with 1 additions and 4 deletions
				
			
		|  | @ -113,10 +113,7 @@ def comma_space_split(s): | ||||||
|     ''' |     ''' | ||||||
|     if s is None: |     if s is None: | ||||||
|         return s |         return s | ||||||
|     s = s.replace(' ', ',') |     return re.split(r'[ ,]+', s.strip()) | ||||||
|     s = [x.strip() for x in s.split(',')] |  | ||||||
|     s = [x for x in s if x] |  | ||||||
|     return s |  | ||||||
| 
 | 
 | ||||||
| def generate_image_thumbnail(filepath, width, height): | def generate_image_thumbnail(filepath, width, height): | ||||||
|     if not os.path.isfile(filepath): |     if not os.path.isfile(filepath): | ||||||
|  |  | ||||||
		Loading…
	
		Reference in a new issue