From 0efe584c9593966d0570e3508a8a5a31a28f5dd6 Mon Sep 17 00:00:00 2001 From: Philip Joseph Date: Sat, 14 Jan 2017 00:07:30 +0530 Subject: [PATCH] Bug 143 Update based on review comments Signed-off-by: Philip Joseph --- layers/pingpong/reactive/pingpong.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/layers/pingpong/reactive/pingpong.py b/layers/pingpong/reactive/pingpong.py index 73b5fd91..21b31eac 100644 --- a/layers/pingpong/reactive/pingpong.py +++ b/layers/pingpong/reactive/pingpong.py @@ -12,13 +12,11 @@ from charms.reactive import ( when, ) import charms.sshproxy -import json from subprocess import ( Popen, CalledProcessError, PIPE, ) -import time cfg = config() @@ -50,6 +48,7 @@ def get_port(): port = 18889 return port + def run(cmd): """ Run a command on the local machine. """ if isinstance(cmd, str): @@ -65,6 +64,7 @@ def run(cmd): output=stderr.decode("utf-8").strip()) return (stdout.decode('utf-8').strip(), stderr.decode('utf-8').strip()) + @when('pingpong.configured') @when('actions.start') def start(): -- 2.25.1