diff options
author | Valerie R Young <spectranaut@riseup.net> | 2016-06-24 11:39:56 -0400 |
---|---|---|
committer | Holger Levsen <holger@layer-acht.org> | 2016-07-05 17:24:55 +0200 |
commit | 4205b546a2c71467f8aa4255423de24b6e086a47 (patch) | |
tree | b3181968c053455b9fce8e33451fb99b61901fde /bin | |
parent | 8c46f64b57464ba35d0c86d4a9f69c7e912396ab (diff) | |
download | jenkins.debian.net-4205b546a2c71467f8aa4255423de24b6e086a47.tar.xz |
reproducible debian: add a percent() function to reproducible_common.py
Signed-off-by: Mattia Rizzolo <mattia@debian.org>
Signed-off-by: Holger Levsen <holger@layer-acht.org>
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/reproducible_common.py | 4 |
1 files changed, 4 insertions, 0 deletions
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' |