Description: fix unicode error with python3
Author: Valentin Vidic <Valentin.Vidic@CARNet.hr>
Bug: https://github.com/ClusterLabs/fence-agents/issues/206
Last-Update: 2018-05-23
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/agents/scsi/fence_scsi.py
+++ b/agents/scsi/fence_scsi.py
@@ -181,11 +181,11 @@
 		fail_usage("Failed: cannot get cluster name")
 
 	try:
-		return hashlib.md5(match.group(1)).hexdigest()
+		return hashlib.md5(match.group(1).encode('ascii')).hexdigest()
 	except ValueError:
 		# FIPS requires usedforsecurity=False and might not be
 		# available on all distros: https://bugs.python.org/issue9216
-		return hashlib.md5(match.group(1), usedforsecurity=False).hexdigest()
+		return hashlib.md5(match.group(1).encode('ascii'), usedforsecurity=False).hexdigest()
 
 
 def get_node_id(options):
