diff options
Diffstat (limited to 'src/leap/bitmask/vpn/privilege.py')
-rw-r--r-- | src/leap/bitmask/vpn/privilege.py | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/leap/bitmask/vpn/privilege.py b/src/leap/bitmask/vpn/privilege.py index 458f690d..dd8d29a9 100644 --- a/src/leap/bitmask/vpn/privilege.py +++ b/src/leap/bitmask/vpn/privilege.py @@ -109,7 +109,7 @@ class LinuxPolicyChecker(object): :returns: a list of the paths where pkexec is to be found :rtype: list """ - if not self._is_pkexec_in_system(): + if not is_pkexec_in_system(): log.warn('System has no pkexec') raise NoPkexecAvailable() @@ -181,12 +181,12 @@ class LinuxPolicyChecker(object): return is_running - @classmethod - def _is_pkexec_in_system(self): - """ - Checks the existence of the pkexec binary in system. - """ - pkexec_path = which('pkexec') - if len(pkexec_path) == 0: - return False - return True + +def is_pkexec_in_system(): + """ + Checks the existence of the pkexec binary in system. + """ + pkexec_path = which('pkexec') + if len(pkexec_path) == 0: + return False + return True |