summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Grover <agrover@redhat.com>2014-09-18 16:37:11 -0700
committerAndy Grover <agrover@redhat.com>2014-09-18 16:37:11 -0700
commitdff8a0c6bcf2cee96475983ce6832089f2320149 (patch)
tree6be1e949415d9fcde166044ecec6d94aca67bf43
parentd51f4aad42fa436a7a033cd565f58c318f45e9d6 (diff)
downloadrtslib-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.py4
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)