Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
dCache
cta
Commits
3606c2b2
Commit
3606c2b2
authored
Sep 02, 2014
by
Sebastien Ponce
Browse files
Merge branch 'v2_1_14Version'
parents
4b164de1
27604c44
Changes
1
Hide whitespace changes
Inline
Side-by-side
hsmtools/castor_tools.py
View file @
3606c2b2
...
...
@@ -578,8 +578,10 @@ def nbToDataAmount(n):
def
printPercentage
(
portion
,
total
):
'''converts portion/total couple to a percentage of completion'''
if
total
==
0
:
if
total
==
0
or
total
is
None
:
return
'N/A'
if
portion
is
None
:
portion
=
0
perc
=
portion
*
100.0
/
total
return
"%.1f%%"
%
perc
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment