mercurial/profiling.py
changeset 32996 41b081ac2145
parent 32869 cb6436e051ca
child 33197 5d8942dbe49e
--- a/mercurial/profiling.py	Tue Jun 20 14:00:41 2017 -0700
+++ b/mercurial/profiling.py	Wed Jun 21 10:46:18 2017 +0200
@@ -126,6 +126,8 @@
         kwargs = {}
 
         def fraction(s):
+            if isinstance(s, (float, int)):
+                return float(s)
             if s.endswith('%'):
                 v = float(s[:-1]) / 100
             else: