From 3d5661dc60b698c6fb3112f4d58ed7340911c91c Mon Sep 17 00:00:00 2001 From: Sunil Mohan Adapa Date: Wed, 1 Jun 2016 20:41:14 +0530 Subject: [PATCH] action_utils: PEP8 fixes and minor changes --- plinth/action_utils.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/plinth/action_utils.py b/plinth/action_utils.py index 8652d2982..34ee840e9 100644 --- a/plinth/action_utils.py +++ b/plinth/action_utils.py @@ -21,10 +21,13 @@ Python action utility functions. from django.utils.translation import ugettext as _ import os +import logging import psutil import socket import subprocess +logger = logging.getLogger(__name__) + def is_systemd_running(): """Return if we are running under systemd.""" @@ -204,7 +207,6 @@ class WebserverChange(object): elif 'reload' in self.actions_required: service_reload('apache2') - def enable(self, name, kind='config'): """Enable a config/module/site in Apache. @@ -233,10 +235,10 @@ def diagnose_port_listening(port, kind='tcp', listen_address=None): if listen_address: test = _('Listening on {kind} port {listen_address}:{port}') \ - .format(kind=kind, listen_address=listen_address, port=port) + .format(kind=kind, listen_address=listen_address, port=port) else: test = _('Listening on {kind} port {port}') \ - .format(kind=kind, port=port) + .format(kind=kind, port=port) return [test, 'passed' if result else 'failed']