mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Small fix for 350a32bd
to make it Py3 compliant
This commit is contained in:
parent
b49d39c5db
commit
a4b2b0a734
1 changed files with 2 additions and 2 deletions
|
@ -22,7 +22,6 @@ __metaclass__ = type
|
||||||
import ast
|
import ast
|
||||||
import os
|
import os
|
||||||
import random
|
import random
|
||||||
import sys
|
|
||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
from json import dumps
|
from json import dumps
|
||||||
|
@ -35,9 +34,10 @@ from ansible.errors import AnsibleError
|
||||||
from ansible.parsing.splitter import parse_kv
|
from ansible.parsing.splitter import parse_kv
|
||||||
from ansible.module_utils._text import to_native, to_text
|
from ansible.module_utils._text import to_native, to_text
|
||||||
|
|
||||||
|
_MAXSIZE = 2**32
|
||||||
cur_id = 0
|
cur_id = 0
|
||||||
node_mac = ("%012x" % uuid.getnode())[:12]
|
node_mac = ("%012x" % uuid.getnode())[:12]
|
||||||
random_int = ("%08x" % random.randint(0, sys.maxint))[:8]
|
random_int = ("%08x" % random.randint(0, _MAXSIZE))[:8]
|
||||||
|
|
||||||
def get_unique_id():
|
def get_unique_id():
|
||||||
global cur_id
|
global cur_id
|
||||||
|
|
Loading…
Reference in a new issue