mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-02 19:32:47 +00:00
Small fix for 350a32bd to make it Py3 compliant
This commit is contained in:
@@ -22,7 +22,6 @@ __metaclass__ = type
|
||||
import ast
|
||||
import os
|
||||
import random
|
||||
import sys
|
||||
import uuid
|
||||
|
||||
from json import dumps
|
||||
@@ -35,9 +34,10 @@ from ansible.errors import AnsibleError
|
||||
from ansible.parsing.splitter import parse_kv
|
||||
from ansible.module_utils._text import to_native, to_text
|
||||
|
||||
_MAXSIZE = 2**32
|
||||
cur_id = 0
|
||||
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():
|
||||
global cur_id
|
||||
|
||||
Reference in New Issue
Block a user