Made the CSSTidyFilter function.
Signed-off-by: Jannis Leidel <jannis@leidel.info>
This commit is contained in:
		 Aaron Godfrey
					Aaron Godfrey
				
			
				
					committed by
					
						 Jannis Leidel
						Jannis Leidel
					
				
			
			
				
	
			
			
			 Jannis Leidel
						Jannis Leidel
					
				
			
						parent
						
							7255025f11
						
					
				
				
					commit
					9e148cdd90
				
			
							
								
								
									
										1
									
								
								AUTHORS
									
									
									
									
									
								
							
							
						
						
									
										1
									
								
								AUTHORS
									
									
									
									
									
								
							| @@ -3,6 +3,7 @@ Christian Metts | ||||
| Django Compressor's filters started life as the filters from Andreas Pelme's | ||||
| django-compress. | ||||
|  | ||||
| Aaron Godfrey | ||||
| Atamert Ölçgen | ||||
| Ben Spaulding | ||||
| Brad Whittington | ||||
|   | ||||
| @@ -1,6 +1,6 @@ | ||||
| import os | ||||
| import warnings | ||||
| from subprocess import Popen, PIPE | ||||
| import tempfile | ||||
| import warnings | ||||
|  | ||||
| from django.conf import settings | ||||
|  | ||||
| @@ -21,7 +21,8 @@ class CSSTidyFilter(FilterBase): | ||||
|  | ||||
|         command = '%s %s %s %s' % (BINARY, tmp_file.name, ARGUMENTS, output_file.name) | ||||
|  | ||||
|         command_output = os.popen(command).read() | ||||
|         command_output = Popen(command, shell=True, | ||||
|             stdout=PIPE, stdin=PIPE, stderr=PIPE).communicate() | ||||
|  | ||||
|         filtered_css = output_file.read() | ||||
|         output_file.close() | ||||
|   | ||||
		Reference in New Issue
	
	Block a user