Skip to content

Commit f46827e

Browse files
losetup and mounted are private
1 parent f6e3c5e commit f46827e

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

lib/inputstreamhelper.py

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,8 @@ def __init__(self, protocol, drm=None):
2828
self._url = None
2929
self._download_path = None
3030
self._bin_path = None
31-
32-
self.mounted = False
33-
self.losetup = False
31+
self._mounted = False
32+
self._losetup = False
3433

3534
self.protocol = protocol
3635
self.drm = drm
@@ -141,14 +140,14 @@ def _losetup(self):
141140
"""Setup Chrome OS loop device."""
142141
cmd = ['losetup', config.LOOP_DEV, self._bin_path, '-o', self._parse_chromeos_offset()]
143142
subprocess.check_output(cmd)
144-
self.losetup = True
143+
self._losetup = True
145144
return True
146145

147146
def _mnt_loop_dev(self):
148147
"""Mount loop device to self._mnt_path()"""
149148
cmd = ['mount', '-t', 'ext2', config.LOOP_DEV, '-o', 'ro', self._mnt_path()]
150149
subprocess.check_output(cmd)
151-
self.mounted = True
150+
self._mounted = True
152151
return True
153152

154153
def _has_widevine_cdm(self):
@@ -423,14 +422,14 @@ def _cleanup(self):
423422
"""Clean up after Widevine DRM installation."""
424423
busy_dialog = xbmcgui.DialogBusy()
425424
busy_dialog.create()
426-
if self.mounted:
425+
if self._mounted:
427426
cmd = ['umount', self._mnt_path()]
428427
subprocess.check_call(cmd)
429-
self.mounted = False
430-
if self.losetup:
428+
self._mounted = False
429+
if self._losetup:
431430
cmd = ['losetup', '-d', config.LOOP_DEV]
432431
subprocess.check_call(cmd)
433-
self.losetup = False
432+
self._losetup = False
434433

435434
shutil.rmtree(self._temp_path())
436435
busy_dialog.close()

0 commit comments

Comments
 (0)