summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/leap/bitmask/platform_init/initializers.py24
1 files changed, 11 insertions, 13 deletions
diff --git a/src/leap/bitmask/platform_init/initializers.py b/src/leap/bitmask/platform_init/initializers.py
index 14d96c9b..b163e1bd 100644
--- a/src/leap/bitmask/platform_init/initializers.py
+++ b/src/leap/bitmask/platform_init/initializers.py
@@ -14,11 +14,9 @@
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
"""
-Platform dependant initializing code
+Platform-dependant initialization code.
"""
-
import logging
import os
import platform
@@ -47,7 +45,7 @@ _system = platform.system()
def init_platform():
"""
- Returns the right initializer for the platform we are running in, or
+ Return the right initializer for the platform we are running in, or
None if no proper initializer is found
"""
initializer = None
@@ -79,7 +77,7 @@ UPDOWN_BADEXEC_MSG = BADEXEC_MSG % (
def get_missing_updown_dialog():
"""
- Creates a dialog for notifying of missing updown scripts.
+ Create a dialog for notifying of missing updown scripts.
Returns that dialog.
:rtype: QtGui.QMessageBox instance
@@ -101,7 +99,7 @@ def get_missing_updown_dialog():
def check_missing():
"""
- Checks for the need of installing missing scripts, and
+ Check for the need of installing missing scripts, and
raises a dialog to ask user for permission to do it.
"""
config = LeapSettings()
@@ -149,7 +147,7 @@ def check_missing():
def _windows_has_tap_device():
"""
- Loops over the windows registry trying to find if the tap0901 tap driver
+ Loop over the windows registry trying to find if the tap0901 tap driver
has been installed on this machine.
"""
import _winreg as reg
@@ -175,7 +173,7 @@ def _windows_has_tap_device():
def WindowsInitializer():
"""
- Raises a dialog in case that the windows tap driver has not been found
+ Raise a dialog in case that the windows tap driver has not been found
in the registry, asking the user for permission to install the driver
"""
if not _windows_has_tap_device():
@@ -219,7 +217,7 @@ def WindowsInitializer():
def _darwin_has_tun_kext():
"""
- Returns True only if we found a directory under the system kext folder
+ Return True only if we found a directory under the system kext folder
containing a kext named tun.kext, AND we found a startup item named 'tun'
"""
# XXX we should be smarter here and use kextstats output.
@@ -235,7 +233,7 @@ def _darwin_has_tun_kext():
def _darwin_install_missing_scripts(badexec, notfound):
"""
- Tries to install the missing up/down scripts.
+ Try to install the missing up/down scripts.
:param badexec: error for notifying execution error during command.
:type badexec: str
@@ -290,7 +288,7 @@ def _darwin_install_missing_scripts(badexec, notfound):
def DarwinInitializer():
"""
- Raises a dialog in case that the osx tuntap driver has not been found
+ Raise a dialog in case that the osx tuntap driver has not been found
in the registry, asking the user for permission to install the driver
"""
# XXX split this function into several
@@ -346,7 +344,7 @@ def DarwinInitializer():
#
def _linux_install_missing_scripts(badexec, notfound):
"""
- Tries to install the missing up/down scripts.
+ Try to install the missing up/down scripts.
:param badexec: error for notifying execution error during command.
:type badexec: str
@@ -397,7 +395,7 @@ def _linux_install_missing_scripts(badexec, notfound):
def LinuxInitializer():
"""
- Raises a dialog in case that either updown scripts or policykit file
+ Raise a dialog in case that either updown scripts or policykit file
are missing or they have incorrect permissions.
"""
check_missing()