Replace superfluous math.pow uses by ** operator
authorAntoine Busque <abusque@efficios.com>
Mon, 14 Mar 2016 19:42:30 +0000 (15:42 -0400)
committerAntoine Busque <abusque@efficios.com>
Mon, 14 Mar 2016 19:42:30 +0000 (15:42 -0400)
Signed-off-by: Antoine Busque <abusque@efficios.com>
lttnganalyses/common/parse_utils.py

index f7a9361d9ab22f1df84be56424b591788c39708a..46487da39ed4b7083d0c471855961996e2487413 100644 (file)
@@ -21,7 +21,6 @@
 # SOFTWARE.
 
 import datetime
-import math
 import re
 from time import timezone
 from . import trace_utils
@@ -92,7 +91,7 @@ def parse_size(size_str):
         else:
             raise ValueError('unrecognised units: {}'.format(units))
 
-        size *= math.pow(base, exponent)
+        size *= base ** exponent
 
     return int(size)
 
@@ -148,7 +147,7 @@ def parse_duration(duration_str):
         # no units defaults to seconds
         exponent = 3
 
-    duration *= math.pow(base, exponent)
+    duration *= base ** exponent
 
     return int(duration)
 
This page took 0.025984 seconds and 5 git commands to generate.