mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-28 23:51:23 -07:00
Python 3: avoid long integer literals
Even Python 2.4 automatically promotes int to long.
This commit is contained in:
parent
f5d4935197
commit
6708d56a21
1 changed files with 7 additions and 7 deletions
|
@ -1722,13 +1722,13 @@ class AnsibleModule(object):
|
||||||
|
|
||||||
def pretty_bytes(self,size):
|
def pretty_bytes(self,size):
|
||||||
ranges = (
|
ranges = (
|
||||||
(1<<70L, 'ZB'),
|
(1<<70, 'ZB'),
|
||||||
(1<<60L, 'EB'),
|
(1<<60, 'EB'),
|
||||||
(1<<50L, 'PB'),
|
(1<<50, 'PB'),
|
||||||
(1<<40L, 'TB'),
|
(1<<40, 'TB'),
|
||||||
(1<<30L, 'GB'),
|
(1<<30, 'GB'),
|
||||||
(1<<20L, 'MB'),
|
(1<<20, 'MB'),
|
||||||
(1<<10L, 'KB'),
|
(1<<10, 'KB'),
|
||||||
(1, 'Bytes')
|
(1, 'Bytes')
|
||||||
)
|
)
|
||||||
for limit, suffix in ranges:
|
for limit, suffix in ranges:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue