| 
				
			 | 
			
			
				@@ -16,6 +16,7 @@ if sys.hexversion < 0x02050000: 
			 | 
		
	
		
			
			| 
				16
			 | 
			
				16
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				17
			 | 
			
				17
			 | 
			
			
				 import os 
			 | 
		
	
		
			
			| 
				18
			 | 
			
				18
			 | 
			
			
				 import re 
			 | 
		
	
		
			
			| 
				
			 | 
			
				19
			 | 
			
			
				+import errno 
			 | 
		
	
		
			
			| 
				19
			 | 
			
				20
			 | 
			
			
				 import difflib 
			 | 
		
	
		
			
			| 
				20
			 | 
			
				21
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				21
			 | 
			
				22
			 | 
			
			
				  
			 | 
		
	
	
		
			
			| 
				
			 | 
			
			
				@@ -492,8 +493,12 @@ if __name__ == '__main__': 
			 | 
		
	
		
			
			| 
				492
			 | 
			
				493
			 | 
			
			
				         # args stolen fron git source: github.com/git/git/blob/master/pager.c 
			 | 
		
	
		
			
			| 
				493
			 | 
			
				494
			 | 
			
			
				         pager = subprocess.Popen(['less', '-FRSXK'], 
			 | 
		
	
		
			
			| 
				494
			 | 
			
				495
			 | 
			
			
				                 stdin=subprocess.PIPE, stdout=sys.stdout) 
			 | 
		
	
		
			
			| 
				495
			 | 
			
				
			 | 
			
			
				-        for line in color_diff: 
			 | 
		
	
		
			
			| 
				496
			 | 
			
				
			 | 
			
			
				-            pager.stdin.write(line) 
			 | 
		
	
		
			
			| 
				
			 | 
			
				496
			 | 
			
			
				+        try: 
			 | 
		
	
		
			
			| 
				
			 | 
			
				497
			 | 
			
			
				+            for line in color_diff: 
			 | 
		
	
		
			
			| 
				
			 | 
			
				498
			 | 
			
			
				+                pager.stdin.write(line) 
			 | 
		
	
		
			
			| 
				
			 | 
			
				499
			 | 
			
			
				+        except IOError as e: 
			 | 
		
	
		
			
			| 
				
			 | 
			
				500
			 | 
			
			
				+            if e.errno == errno.EPIPE: 
			 | 
		
	
		
			
			| 
				
			 | 
			
				501
			 | 
			
			
				+                pass 
			 | 
		
	
		
			
			| 
				497
			 | 
			
				502
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				498
			 | 
			
				503
			 | 
			
			
				         pager.stdin.close() 
			 | 
		
	
		
			
			| 
				499
			 | 
			
				504
			 | 
			
			
				         pager.wait() 
			 |