diff --git a/youtube_dl/utils.py b/youtube_dl/utils.py index a17db849b..333de7a64 100644 --- a/youtube_dl/utils.py +++ b/youtube_dl/utils.py @@ -2539,14 +2539,13 @@ class I18N(object): if t is not None: return t - if t is None: - for root in get_root_dirs(): - try: - t = gettext.translation(self.domain, os.path.join(root, 'share', 'locale'), [lang]) - if t is not None: - break - except (OSError, IOError): # OSError for 3.3+ and IOError otherwise - t = None + for root in get_root_dirs(): + try: + t = gettext.translation(self.domain, os.path.join(root, 'share', 'locale'), [lang]) + if t is not None: + break + except (OSError, IOError): # OSError for 3.3+ and IOError otherwise + t = None if t is None and sys.platform == 'win32' and hasattr(sys, 'frozen'): locale_data_zip = _load_exe_resource('LOCALE_DATA', 'LOCALE_DATA.ZIP')