We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ad224a4 commit dab1afdCopy full SHA for dab1afd
mamonsu/lib/platform.py
@@ -7,3 +7,8 @@
7
8
PY2 = (sys.version_info[0] == 2)
9
PY3 = (sys.version_info[0] == 3)
10
+
11
+if PY2:
12
+ INTEGER_TYPES = (int, long)
13
+if PY3:
14
+ INTEGER_TYPES = int
mamonsu/tools/report/format.py
@@ -2,6 +2,7 @@
2
3
import re
4
import sys
5
+import mamonsu.lib.platform as platform
6
class color(object):
@@ -34,7 +35,7 @@ def __getattr__(self, name):
34
35
# int (bytes) => str (human readable)
36
def humansize_bytes(nbytes):
37
fmt = '{0:>6} {1}'
- if not isinstance(nbytes, int):
38
+ if not isinstance(nbytes, platform.INTEGER_TYPES):
39
return 'ERROR'
40
if nbytes == 0:
41
return fmt.format(0, 'B')
0 commit comments