mirror of
				https://github.com/yt-dlp/yt-dlp.git
				synced 2025-10-30 22:25:19 +00:00 
			
		
		
		
	[cleanup] Misc fixes
Cherry-picks from: #3498, #3947 Related: #3949, https://github.com/yt-dlp/yt-dlp/issues/1839#issuecomment-1140313836 Authored by: pukkandan, flashdagger, gamer191
This commit is contained in:
		| @@ -1936,7 +1936,7 @@ def intlist_to_bytes(xs): | ||||
| 
 | ||||
| 
 | ||||
| class LockingUnsupportedError(OSError): | ||||
|     msg = 'File locking is not supported on this platform' | ||||
|     msg = 'File locking is not supported' | ||||
| 
 | ||||
|     def __init__(self): | ||||
|         super().__init__(self.msg) | ||||
| @@ -2061,8 +2061,11 @@ class locked_file: | ||||
|             try: | ||||
|                 self.f.truncate() | ||||
|             except OSError as e: | ||||
|                 if e.errno != 29:  # Illegal seek, expected when self.f is a FIFO | ||||
|                     raise e | ||||
|                 if e.errno not in ( | ||||
|                     errno.ESPIPE,  # Illegal seek - expected for FIFO | ||||
|                     errno.EINVAL,  # Invalid argument - expected for /dev/null | ||||
|                 ): | ||||
|                     raise | ||||
|         return self | ||||
| 
 | ||||
|     def unlock(self): | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 pukkandan
					pukkandan