mirror of
				https://github.com/yt-dlp/yt-dlp.git
				synced 2025-10-31 06:35:12 +00:00 
			
		
		
		
	Create to_screen and similar functions in postprocessor/common
				
					
				
			`to_screen`, `report_warning`, `report_error`, `write_debug`, `get_param` This is a first step in standardizing these function. This has to be done eventually for extractors and downloaders too
This commit is contained in:
		| @@ -57,16 +57,16 @@ class XAttrMetadataPP(PostProcessor): | ||||
|             return [], info | ||||
|  | ||||
|         except XAttrUnavailableError as e: | ||||
|             self._downloader.report_error(str(e)) | ||||
|             self.report_error(str(e)) | ||||
|             return [], info | ||||
|  | ||||
|         except XAttrMetadataError as e: | ||||
|             if e.reason == 'NO_SPACE': | ||||
|                 self._downloader.report_warning( | ||||
|                 self.report_warning( | ||||
|                     'There\'s no disk space left, disk quota exceeded or filesystem xattr limit exceeded. ' | ||||
|                     + (('Some ' if num_written else '') + 'extended attributes are not written.').capitalize()) | ||||
|             elif e.reason == 'VALUE_TOO_LONG': | ||||
|                 self._downloader.report_warning( | ||||
|                 self.report_warning( | ||||
|                     'Unable to write extended attributes due to too long values.') | ||||
|             else: | ||||
|                 msg = 'This filesystem doesn\'t support extended attributes. ' | ||||
| @@ -74,5 +74,5 @@ class XAttrMetadataPP(PostProcessor): | ||||
|                     msg += 'You need to use NTFS.' | ||||
|                 else: | ||||
|                     msg += '(You may have to enable them in your /etc/fstab)' | ||||
|                 self._downloader.report_error(msg) | ||||
|                 self.report_error(msg) | ||||
|             return [], info | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 pukkandan
					pukkandan