Skip to content

Commit 0818e45

Browse files
Flip root user logic
1 parent 6c5d42c commit 0818e45

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/inputstreamhelper.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ def _mnt_loop_dev(self):
182182
"""Mount loop device to self._mnt_path()"""
183183
dialog = xbmcgui.Dialog()
184184
cmd = ['mount', '-t', 'ext2', self._loop_dev, '-o', 'ro', self._mnt_path()]
185-
if not os.getuid() == 0 and self._cmd_exists('sudo'): # ask for permission to wrap cmd in sudo
185+
if os.getuid() != 0 and self._cmd_exists('sudo'): # ask for permission to wrap cmd in sudo
186186
if dialog.yesno(self._language(30001), self._language(30030), yeslabel=self._language(30029), nolabel=self._language(30028)):
187187
cmd.insert(0, 'sudo')
188188
else:
@@ -495,7 +495,7 @@ def _cleanup(self):
495495
"""Clean up after Widevine DRM installation."""
496496
if self._mounted:
497497
cmd = ['umount', self._mnt_path()]
498-
if not os.getuid() == 0 and self._cmd_exists('sudo'): # no need to ask for permission again
498+
if os.getuid() != 0 and self._cmd_exists('sudo'): # no need to ask for permission again
499499
cmd.insert(0, 'sudo')
500500
unmount_success = self._run_cmd(cmd)
501501
if unmount_success:

0 commit comments

Comments
 (0)