From 83c0221b4313a67b0c37828d2f5f7cd1298bf770 Mon Sep 17 00:00:00 2001 From: Emiliano Vavassori Date: Wed, 30 Sep 2015 01:34:00 +0200 Subject: [PATCH] Fixed first part launching commands for repo version. --- roles/prereq/templates/checksum.fact | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/roles/prereq/templates/checksum.fact b/roles/prereq/templates/checksum.fact index 52e7b6d..b8ce110 100644 --- a/roles/prereq/templates/checksum.fact +++ b/roles/prereq/templates/checksum.fact @@ -1,4 +1,5 @@ #!/usr/bin/env python +repover.close() from subprocess import Popen, PIPE, STDOUT from os.path import isfile @@ -15,9 +16,9 @@ local_repo_hash = '' live_repo_hash = '' # Getting live versions for repo -p = Popen("pushd %s >/dev/null; git log --pretty=oneline -1 | cut -d' ' -f 1; popd > /dev/null" % repo_path, shell=True, stdout=PIPE, stderr=STDOUT) -output = p.communicate()[0] -live_repo_hash = output.strip() +p = Popen("bash -c \"pushd %s >/dev/null; git log --pretty=oneline -1 | cut + -d' ' -f 1; popd > /dev/null\"" % repo_path, shell=True, stdout=PIPE, stderr=STDOUT) +live_repo_hash = p.communicate()[0].strip() live_pkg_hash = '' # Recreating pkg checksum