mirror of
				https://github.com/yt-dlp/yt-dlp.git
				synced 2025-10-31 06:35:12 +00:00 
			
		
		
		
	Py2 compatibility for FileNotFoundError
				
					
				
			This commit is contained in:
		| @@ -1,5 +1,6 @@ | ||||
| from __future__ import unicode_literals | ||||
|  | ||||
| import errno | ||||
| try: | ||||
|     import concurrent.futures | ||||
|     can_threaded_download = True | ||||
| @@ -126,7 +127,10 @@ class DashSegmentsFD(FragmentFD): | ||||
|                         file.close() | ||||
|                         self._append_fragment(ctx, frag_content) | ||||
|                         return True | ||||
|                     except FileNotFoundError: | ||||
|                     except EnvironmentError as ose: | ||||
|                         if ose.errno != errno.ENOENT: | ||||
|                             raise | ||||
|                         # FileNotFoundError | ||||
|                         if skip_unavailable_fragments: | ||||
|                             self.report_skip_fragment(frag_index) | ||||
|                             return True | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 pukkandan
					pukkandan