Skip to content

Commit 6d68ad8

Browse files
PEP 8
1 parent a5de193 commit 6d68ad8

File tree

1 file changed

+13
-8
lines changed

1 file changed

+13
-8
lines changed

lib/inputstreamhelper.py

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,8 @@ def _has_widevine_cdm(self):
156156
else:
157157
for filename in os.listdir(self._inputstream_cdm_path()):
158158
if 'widevine' in filename and filename.endswith(config.CDM_EXTENSIONS):
159-
self._log('Found Widevine binary at {0}'.format(os.path.join(self._inputstream_cdm_path(), filename)))
159+
self._log(
160+
'Found Widevine binary at {0}'.format(os.path.join(self._inputstream_cdm_path(), filename)))
160161
return True
161162

162163
self._log('Widevine is not installed.')
@@ -347,7 +348,8 @@ def _install_widevine_cdm_arm(self):
347348
dialog.ok(self._language(30004), self._language(30019).format(self._os))
348349
return False
349350
if download_dict['required_diskspace'] >= self._diskspace():
350-
dialog.ok(self._language(30004), self._language(30018).format(self.sizeof_fmt(download_dict['diskspace'])))
351+
dialog.ok(self._language(30004),
352+
self._language(30018).format(self.sizeof_fmt(download_dict['diskspace'])))
351353
return False
352354
if not self._cmd_exists('fdisk') and not self._cmd_exists('parted'):
353355
dialog.ok(self._language(30004), self._language(30020).format('fdisk', 'parted'))
@@ -403,9 +405,9 @@ def _extract_cdm_from_img(self):
403405
"""Extract the Widevine CDM binary from the mounted Chrome OS image."""
404406
for root, dirs, files in os.walk(self._mnt_path()):
405407
for filename in files:
406-
if filename == 'libwidevinecdm.so':
407-
shutil.copyfile(os.path.join(root, filename), os.path.join(self._cdm_path(), filename))
408-
return True
408+
if filename == 'libwidevinecdm.so':
409+
shutil.copyfile(os.path.join(root, filename), os.path.join(self._cdm_path(), filename))
410+
return True
409411

410412
self._log('Failed to find Widevine CDM binary in Chrome OS image.')
411413
return False
@@ -454,9 +456,11 @@ def _supports_hls(self):
454456
if LooseVersion(self._inputstream_version()) >= LooseVersion(config.HLS_MINIMUM_IA_VERSION):
455457
return True
456458
else:
457-
self._log('HLS is not supported on {0} version {1}'.format(self._inputstream_addon, self._inputstream_version()))
459+
self._log(
460+
'HLS is not supported on {0} version {1}'.format(self._inputstream_addon, self._inputstream_version()))
458461
dialog = xbmcgui.Dialog()
459-
dialog.ok(self._language(30004), self._language(30017).format(self._inputstream_addon, config.HLS_MINIMUM_IA_VERSION))
462+
dialog.ok(self._language(30004),
463+
self._language(30017).format(self._inputstream_addon, config.HLS_MINIMUM_IA_VERSION))
460464
return False
461465

462466
def _check_drm(self):
@@ -482,7 +486,8 @@ def check_inputstream(self):
482486
return False
483487
elif not self._inputstream_enabled():
484488
self._log('{0} is not enabled.'.format(self._inputstream_addon))
485-
ok = dialog.yesno(self._language(30001), self._language(30009).format(self._inputstream_addon, self._inputstream_addon))
489+
ok = dialog.yesno(self._language(30001),
490+
self._language(30009).format(self._inputstream_addon, self._inputstream_addon))
486491
if ok:
487492
self._enable_inputstream()
488493
else:

0 commit comments

Comments
 (0)