summaryrefslogtreecommitdiff
path: root/textutils.py
diff options
context:
space:
mode:
authorSylvain Th?nault <sylvain.thenault@logilab.fr>2009-09-30 17:50:26 +0200
committerSylvain Th?nault <sylvain.thenault@logilab.fr>2009-09-30 17:50:26 +0200
commitfd84c199bbeb81399bb0cf77408d4fce6fa9ae8f (patch)
treeb2dc5521ea5721f375ebd6dad7a72f5f56097a6d /textutils.py
parent92a6f980384f58f0fdab73360ad5287bd9d3cd04 (diff)
downloadlogilab-common-fd84c199bbeb81399bb0cf77408d4fce6fa9ae8f.tar.gz
add support for bytes and time to lgc.configuration
Diffstat (limited to 'textutils.py')
-rw-r--r--textutils.py3
1 files changed, 0 insertions, 3 deletions
diff --git a/textutils.py b/textutils.py
index 1c24c70..3c40dda 100644
--- a/textutils.py
+++ b/textutils.py
@@ -280,8 +280,6 @@ def apply_units( string, units, inter=None, final=float, blank_reg=_BLANK_RE,
"""
if inter is None:
inter = final
-
-
string = _BLANK_RE.sub('',string)
values = []
for match in value_reg.finditer(string):
@@ -293,7 +291,6 @@ def apply_units( string, units, inter=None, final=float, blank_reg=_BLANK_RE,
if unit is not None:
value *= units[unit]
values.append(value)
-
return final(sum(values))
_LINE_RGX = re.compile('\r\n|\r+|\n')