From 3262e7624815d3979f558b301cb07c7f111acd51 Mon Sep 17 00:00:00 2001 From: Giulio Fidente Date: Wed, 21 May 2014 14:28:15 +0200 Subject: [PATCH] Ensure dib-run-parts profiling works with py3 and py2 This change adjusts the "inline" python function used to profile run-parts duration to make it run successfully on both py2 and py3 Change-Id: Ib5287a56b8e2b3e882dca489192f01d9f01cd8ba --- elements/dib-run-parts/bin/dib-run-parts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/elements/dib-run-parts/bin/dib-run-parts b/elements/dib-run-parts/bin/dib-run-parts index 85715ce74..c98b853df 100755 --- a/elements/dib-run-parts/bin/dib-run-parts +++ b/elements/dib-run-parts/bin/dib-run-parts @@ -100,7 +100,7 @@ for target in $(find . -name 'start_*' -printf '%f\n') ; do stop_file=stop_${target##start_} start_seconds=$(cat $target) stop_seconds=$(cat $stop_file) - duration=$(python -c "print $stop_seconds - $start_seconds") + duration=$(python -c "print($stop_seconds - $start_seconds)") LC_NUMERIC=C printf "%-40s %10.3f\n" ${target##start_} $duration done popd > /dev/null