Browse Source

Simplify chained comparison (#3816)

Matheus Rocha Vieira 7 years ago
parent
commit
477eb4978e
1 changed files with 1 additions and 1 deletions
  1. 1 1
      toolset/utils/results.py

+ 1 - 1
toolset/utils/results.py

@@ -534,7 +534,7 @@ class Results:
             # We'll assume that any number we get is convertable to a float, just in case
             num = float(num)
             for x in ['bytes', 'KB', 'MB', 'GB']:
-                if num < 1024.0 and num > -1024.0:
+                if 1024.0 > num > -1024.0:
                     return "%3.1f%s" % (num, x)
                 num /= 1024.0
             return "%3.1f%s" % (num, 'TB')