From 3922a88263a3529b62af774b3fc45cdac9738f3a Mon Sep 17 00:00:00 2001 From: Thirumal Ravula Date: Thu, 30 Apr 2015 11:01:19 +0530 Subject: [PATCH] undefined varaible ose is fixed. --- src/VMManager/LabActionScript.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/VMManager/LabActionScript.py b/src/VMManager/LabActionScript.py index f9ecb74..29935ef 100644 --- a/src/VMManager/LabActionScript.py +++ b/src/VMManager/LabActionScript.py @@ -6,7 +6,7 @@ class EmptyLabActionError(Exception): pass - + class LabActionScript: """Runs an action which is usually a bash or Python script.""" ACTION_EMPTY = 0x1 @@ -30,7 +30,7 @@ class LabActionScript: BACKUP_SCRIPT_KEY = "backup" STATS_SCRIPT_KEY = "stats" PUBLISH_SCRIPT_KEY = "publish" - + def __init__(self, cmd): self._cmd = cmd.strip() self._state = LabActionScript.ACTION_EMPTY @@ -49,10 +49,10 @@ def run(self): self._state = LabActionScript.ACTION_COMPLETED except Exception, e: self._state = LabActionScript.ACTION_UNSUCCESSFUL - logger.error("LabActionScript::run() ose - " + str(ose)) + logger.error("LabActionScript::run() exception is: %s" % str(e)) return self - + def run_async(self): """ TODO: PROVIDE A DECENT IMPLEMENTATION!!""" """Runs a command asynchronously.""" @@ -84,7 +84,7 @@ def testEmptyAction(): except EmptyLabActionError: pass assert(action.empty() == True) - + def testGitCloneAction(): action = LabActionScript("git clone https://bitbucket.org/deviprasad/itworkshop2-spring-2014.git") action.run()