diff options
author | Andy Grover <agrover@redhat.com> | 2014-09-18 16:37:11 -0700 |
---|---|---|
committer | Andy Grover <agrover@redhat.com> | 2014-09-18 16:37:11 -0700 |
commit | dff8a0c6bcf2cee96475983ce6832089f2320149 (patch) | |
tree | 6be1e949415d9fcde166044ecec6d94aca67bf43 | |
parent | d51f4aad42fa436a7a033cd565f58c318f45e9d6 (diff) | |
download | rtslib-fb-dff8a0c6bcf2cee96475983ce6832089f2320149.tar.gz |
Use uuid.hex property instead of get_hex()
To work in python3.
fixes #52
Reported-by: Arthur Lutz
Signed-off-by: Andy Grover <agrover@redhat.com>
-rw-r--r-- | rtslib/utils.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/rtslib/utils.py b/rtslib/utils.py index 88a8d2b..180056b 100644 --- a/rtslib/utils.py +++ b/rtslib/utils.py @@ -281,9 +281,9 @@ def generate_wwn(wwn_type): # 5 = IEEE registered # 001405 = OpenIB OUI (they let us use it I guess?) # rest = random - return "naa.5001405" + uuid.uuid4().get_hex()[-9:] + return "naa.5001405" + uuid.uuid4().hex[-9:] elif wwn_type == 'eui': - return "eui.001405" + uuid.uuid4().get_hex()[-10:] + return "eui.001405" + uuid.uuid4().hex[-10:] else: raise ValueError("Unknown WWN type: %s." % wwn_type) |