[Qa-jenkins-scm] [jenkins.debian.net] 03/08: reproducible debian: add a percent() function to reproducible_common.py

Holger Levsen holger at layer-acht.org
Tue Jul 5 15:25:11 UTC 2016


This is an automated email from the git hooks/post-receive script.

holger pushed a commit to branch master
in repository jenkins.debian.net.

commit 4205b546a2c71467f8aa4255423de24b6e086a47
Author: Valerie R Young <spectranaut at riseup.net>
Date:   Fri Jun 24 11:39:56 2016 -0400

    reproducible debian: add a percent() function to reproducible_common.py
    
    Signed-off-by: Mattia Rizzolo <mattia at debian.org>
    Signed-off-by: Holger Levsen <holger at layer-acht.org>
---
 bin/reproducible_common.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/bin/reproducible_common.py b/bin/reproducible_common.py
index 7548a93..8738a50 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'

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/qa/jenkins.debian.net.git



More information about the Qa-jenkins-scm mailing list