From 4205b546a2c71467f8aa4255423de24b6e086a47 Mon Sep 17 00:00:00 2001 From: Valerie R Young Date: Fri, 24 Jun 2016 11:39:56 -0400 Subject: reproducible debian: add a percent() function to reproducible_common.py Signed-off-by: Mattia Rizzolo Signed-off-by: Holger Levsen --- bin/reproducible_common.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bin/reproducible_common.py b/bin/reproducible_common.py index 7548a937..8738a501 100755 --- a/bin/reproducible_common.py +++ b/bin/reproducible_common.py @@ -312,6 +312,10 @@ def print_critical_message(msg): print('\n\n\n') +def percent(part, whole): + return round(100 * float(part)/float(whole), 1) + + class bcolors: BOLD = '\033[1m' UNDERLINE = '\033[4m' -- cgit v1.2.3-70-g09d2