From 30bb58c3c8169be1aedaf66a1d9aba3f948ff9d9 Mon Sep 17 00:00:00 2001 From: brainbot-devops Date: Fri, 9 Aug 2019 13:02:37 +0200 Subject: [PATCH] Lint code. --- scenario_player/main.py | 2 -- scenario_player/services/utils/factories.py | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/scenario_player/main.py b/scenario_player/main.py index 54244003d..fbe8f6ed5 100644 --- a/scenario_player/main.py +++ b/scenario_player/main.py @@ -26,9 +26,7 @@ from raiden.utils.cli import EnumChoiceType from scenario_player import tasks from scenario_player.exceptions import ScenarioAssertionError, ScenarioError -from scenario_player.exceptions.services import ServiceProcessException from scenario_player.runner import ScenarioRunner -from scenario_player.services.common.app import ServiceProcess from scenario_player.tasks.base import collect_tasks from scenario_player.ui import ScenarioUI, attach_urwid_logbuffer from scenario_player.utils import ( diff --git a/scenario_player/services/utils/factories.py b/scenario_player/services/utils/factories.py index 4bb130705..e60132ad9 100644 --- a/scenario_player/services/utils/factories.py +++ b/scenario_player/services/utils/factories.py @@ -72,7 +72,7 @@ def daemonize(pidfile: pathlib.Path, *, stdin="/dev/null", stdout="/dev/null", s try: if os.fork() > 0: raise SystemExit(0) # Parent exit - except OSError as e: + except OSError: raise RuntimeError("fork #1 failed.") os.chdir("/") @@ -82,7 +82,7 @@ def daemonize(pidfile: pathlib.Path, *, stdin="/dev/null", stdout="/dev/null", s try: if os.fork() > 0: raise SystemExit(0) - except OSError as e: + except OSError: raise RuntimeError("fork #2 failed.") # Flush I/O buffers