From 209351684a344408b92a24284ad459286d0ef375 Mon Sep 17 00:00:00 2001 From: Yaroslav Brustinov Date: Mon, 20 Feb 2017 16:01:59 +0200 Subject: STF daemon: add message error if server is already running by current user. Change-Id: I35400a64d976ce690d298d560dce2ae2254bfb6b Signed-off-by: Yaroslav Brustinov --- scripts/automation/trex_control_plane/server/trex_server.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'scripts') diff --git a/scripts/automation/trex_control_plane/server/trex_server.py b/scripts/automation/trex_control_plane/server/trex_server.py index 8abd8838..60febc6a 100755 --- a/scripts/automation/trex_control_plane/server/trex_server.py +++ b/scripts/automation/trex_control_plane/server/trex_server.py @@ -334,9 +334,10 @@ class CTRexServer(object): logger.info("TRex is reserved to another user ({res_user}). Only that user is allowed to initiate new runs.".format(res_user = self.__reservation['user'])) return Fault(-33, "TRex is reserved to another user ({res_user}). Only that user is allowed to initiate new runs.".format(res_user = self.__reservation['user'])) # raise at client TRexRequestDenied elif self.trex.get_status() != TRexStatus.Idle: - logger.info("TRex is already taken, cannot create another run until done.") - return Fault(-13, '') # raise at client TRexInUseError - + err = 'TRex is already taken, cannot create another run until done.' + logger.info(err) + return Fault(-13, err) # raise at client TRexInUseError + try: server_cmd_data = self.generate_run_cmd(stateless = stateless, debug_image = debug_image, trex_args = trex_args, **trex_cmd_options) self.zmq_monitor.first_dump = True -- cgit 1.2.3-korg