0
0
Fork 0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2024-12-02 03:47:27 +00:00

Merge pull request #9493 from jwilk/errno

Don't hardcode errno constant
This commit is contained in:
Yen Chi Hsuan 2016-05-14 20:00:11 +08:00
commit 707bb426b1

View file

@ -326,7 +326,7 @@ def __init__(self, params=None, auto_init=True):
['fribidi', '-c', 'UTF-8'] + width_args, **sp_kwargs) ['fribidi', '-c', 'UTF-8'] + width_args, **sp_kwargs)
self._output_channel = os.fdopen(master, 'rb') self._output_channel = os.fdopen(master, 'rb')
except OSError as ose: 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.') 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: else:
raise raise