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: If1e6ac6fe528ca0225dcdbe5774545512be9d13a
This commit is contained in:
Giulio Fidente 2014-06-06 18:34:20 +02:00
parent 379d7ad51c
commit 45b7cf44bc
1 changed files with 1 additions and 1 deletions

View File

@ -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