X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=src%2Fnepi%2Fresources%2Flinux%2Fccn%2Fccnr.py;h=378f93c608cf6cee50f9239eb8ae949ea8ff3673;hb=bf43c83ced9389c8fa9468d7c23f67d35af963da;hp=ac10840ff20cbcbd3e5d7163adaf6a4403554272;hpb=e219e0dbd16174fed127a613fb0a0fb3203609f3;p=nepi.git diff --git a/src/nepi/resources/linux/ccn/ccnr.py b/src/nepi/resources/linux/ccn/ccnr.py index ac10840f..378f93c6 100644 --- a/src/nepi/resources/linux/ccn/ccnr.py +++ b/src/nepi/resources/linux/ccn/ccnr.py @@ -225,8 +225,7 @@ class LinuxCCNR(LinuxApplication): raise self.debug("----- READY ---- ") - self._ready_time = tnow() - self._state = ResourceState.READY + self.set_ready() def upload_start_command(self): command = self.get("command") @@ -257,16 +256,15 @@ class LinuxCCNR(LinuxApplication): raise_on_error = True) def start(self): - if self._state == ResourceState.READY: + if self.state == ResourceState.READY: command = self.get("command") self.info("Starting command '%s'" % command) - self._start_time = tnow() - self._state = ResourceState.STARTED + self.set_started() else: msg = " Failed to execute command '%s'" % command self.error(msg, out, err) - self._state = ResourceState.FAILED + self.fail() raise RuntimeError, msg @property