diff --git a/actions/openvpn b/actions/openvpn
index 5cc26cb2a..b3f67a51f 100755
--- a/actions/openvpn
+++ b/actions/openvpn
@@ -16,7 +16,6 @@
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see .
#
-
"""
Configuration helper for OpenVPN server.
"""
@@ -92,8 +91,7 @@ CERTIFICATE_CONFIGURATION = {
'KEY_NAME': 'FreedomBox'
}
-COMMON_ARGS = {'env': CERTIFICATE_CONFIGURATION,
- 'cwd': KEYS_DIRECTORY}
+COMMON_ARGS = {'env': CERTIFICATE_CONFIGURATION, 'cwd': KEYS_DIRECTORY}
def parse_arguments():
@@ -155,10 +153,12 @@ def _create_server_config():
def _setup_firewall():
"""Add TUN device to internal zone in firewalld."""
- subprocess.call(['firewall-cmd', '--zone', 'internal',
- '--add-interface', 'tun+'])
- subprocess.call(['firewall-cmd', '--permanent', '--zone', 'internal',
- '--add-interface', 'tun+'])
+ subprocess.call(
+ ['firewall-cmd', '--zone', 'internal', '--add-interface', 'tun+'])
+ subprocess.call([
+ 'firewall-cmd', '--permanent', '--zone', 'internal', '--add-interface',
+ 'tun+'
+ ])
def _create_certificates():
@@ -171,8 +171,8 @@ def _create_certificates():
subprocess.check_call(['/usr/share/easy-rsa/clean-all'], **COMMON_ARGS)
subprocess.check_call(['/usr/share/easy-rsa/pkitool', '--initca'],
**COMMON_ARGS)
- subprocess.check_call(['/usr/share/easy-rsa/pkitool', '--server',
- 'server'], **COMMON_ARGS)
+ subprocess.check_call(
+ ['/usr/share/easy-rsa/pkitool', '--server', 'server'], **COMMON_ARGS)
subprocess.check_call(['/usr/share/easy-rsa/build-dh'], **COMMON_ARGS)
@@ -224,8 +224,8 @@ def _is_non_empty_file(filepath):
def load_augeas():
"""Initialize Augeas."""
- aug = augeas.Augeas(flags=augeas.Augeas.NO_LOAD +
- augeas.Augeas.NO_MODL_AUTOLOAD)
+ aug = augeas.Augeas(
+ flags=augeas.Augeas.NO_LOAD + augeas.Augeas.NO_MODL_AUTOLOAD)
# shell-script config file lens
aug.set('/augeas/load/Simplevars/lens', 'Simplevars.lns')
diff --git a/plinth/modules/openvpn/__init__.py b/plinth/modules/openvpn/__init__.py
index bb860182b..36a7eef48 100644
--- a/plinth/modules/openvpn/__init__.py
+++ b/plinth/modules/openvpn/__init__.py
@@ -14,7 +14,6 @@
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see .
#
-
"""
Plinth module to configure OpenVPN server.
"""
@@ -57,13 +56,14 @@ description = [
def init():
"""Initialize the OpenVPN module."""
menu = main_menu.get('apps')
- menu.add_urlname(name, 'glyphicon-lock', 'openvpn:index', short_description)
+ menu.add_urlname(name, 'glyphicon-lock', 'openvpn:index',
+ short_description)
global service
setup_helper = globals()['setup_helper']
if setup_helper.get_state() != 'needs-setup':
- service = service_module.Service(
- managed_services[0], name, ports=['openvpn'], is_external=True)
+ service = service_module.Service(managed_services[0], name,
+ ports=['openvpn'], is_external=True)
if service.is_enabled() and is_setup():
add_shortcut()
@@ -75,9 +75,9 @@ def setup(helper, old_version=None):
helper.call('post', actions.superuser_run, 'openvpn', ['upgrade'])
global service
if service is None:
- service = service_module.Service(
- managed_services[0], name, ports=['openvpn'], is_external=True,
- enable=enable, disable=disable)
+ service = service_module.Service(managed_services[0], name,
+ ports=['openvpn'], is_external=True,
+ enable=enable, disable=disable)
def add_shortcut():
@@ -86,11 +86,10 @@ def add_shortcut():
format_lazy(_(''
'Download Profile'),
link=reverse_lazy('openvpn:profile'))
- frontpage.add_shortcut('openvpn', name,
- short_description=short_description,
- details=description + [download_profile],
- configure_url=reverse_lazy('openvpn:index'),
- login_required=True)
+ frontpage.add_shortcut(
+ 'openvpn', name, short_description=short_description,
+ details=description + [download_profile],
+ configure_url=reverse_lazy('openvpn:index'), login_required=True)
def is_setup():