Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 11 additions & 8 deletions noseapp_daemon/runner.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# -*- coding: utf-8 -*-

import logging

import psutil

from noseapp_daemon import utils
Expand Down Expand Up @@ -101,6 +100,16 @@ def cmd(self):
'Property "cmd" should be implemented in subclasses.',
)

@property
def cmd_with_prefix(self):
result = ''

if self.cmd_prefix:
result += self.cmd_prefix + ' '
result += self.cmd

return result

@property
def started(self):
return bool(self.process) or self.pid_file.exist
Expand All @@ -123,13 +132,7 @@ def start(self):

self.before_start()

cmd = []

if self.cmd_prefix:
cmd.append(self.cmd_prefix)

cmd += self.cmd
cmd = ' '.join(cmd)
cmd = self.cmd_with_prefix

process_options = self.process_options.copy()

Expand Down