Skip to content

Commit 4d280fa

Browse files
Make sure EULA files are downloaded
1 parent 7dc9d3a commit 4d280fa

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

lib/inputstreamhelper.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -392,10 +392,13 @@ def _widevine_eula(self):
392392
eula = f.read().strip().replace('\n', ' ')
393393
else: # grab the license from the x86 files
394394
self._url = config.WIDEVINE_DOWNLOAD_URL.format(self._current_widevine_cdm_version(), 'linux', 'x64')
395-
self._http_request(download=True, message=self._language(30025))
396-
with zipfile.ZipFile(self._download_path) as z:
397-
with z.open(config.WIDEVINE_LICENSE_FILE) as f:
398-
eula = f.read().strip().replace('\n', ' ')
395+
downloaded = self._http_request(download=True, message=self._language(30025))
396+
if downloaded:
397+
with zipfile.ZipFile(self._download_path) as z:
398+
with z.open(config.WIDEVINE_LICENSE_FILE) as f:
399+
eula = f.read().strip().replace('\n', ' ')
400+
else:
401+
return False
399402

400403
dialog = xbmcgui.Dialog()
401404
return dialog.yesno(self._language(30026), eula, yeslabel=self._language(30027), nolabel=self._language(30028))

0 commit comments

Comments
 (0)