mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-07 11:42:43 +01:00
Don't hardcode errno constant
The value of ENOENT is architecture-dependent, so don't assume it's always 2.
This commit is contained in:
parent
98d560f205
commit
66e7ace17a
@ -326,7 +326,7 @@ def __init__(self, params=None, auto_init=True):
|
||||
['fribidi', '-c', 'UTF-8'] + width_args, **sp_kwargs)
|
||||
self._output_channel = os.fdopen(master, 'rb')
|
||||
except OSError as ose:
|
||||
if ose.errno == 2:
|
||||
if ose.errno == errno.ENOENT:
|
||||
self.report_warning('Could not find fribidi executable, ignoring --bidi-workaround . Make sure that fribidi is an executable file in one of the directories in your $PATH.')
|
||||
else:
|
||||
raise
|
||||
|
Loading…
Reference in New Issue
Block a user