From 937d1021e8b5c0083f28d9704de97dc73739ccf7 Mon Sep 17 00:00:00 2001 From: salimfadhley Date: Wed, 19 Jun 2013 00:02:37 +0100 Subject: [PATCH] moved the test for war existance into python --- jenkinsapi_utils/jenkins_launcher.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/jenkinsapi_utils/jenkins_launcher.py b/jenkinsapi_utils/jenkins_launcher.py index d271ed6..e52d3c5 100644 --- a/jenkinsapi_utils/jenkins_launcher.py +++ b/jenkinsapi_utils/jenkins_launcher.py @@ -56,7 +56,11 @@ class JenkinsLancher(object): def update_war(self): os.chdir(self.war_directory) - subprocess.check_call('./get-jenkins-war.sh') + if os.path.exists(self.war_path): + log.info("We already have the War file...") + else: + log.info("Redownloading Jenkins") + subprocess.check_call('./get-jenkins-war.sh') def stop(self): log.info("Shutting down jenkins.") -- 2.7.4