Blame SOURCES/0003-Fix-exception-in-convert_scsi_hctl_to_path.patch

7dac0e
From e6b267ec3712b5d13c352c6090dffbd0144ed028 Mon Sep 17 00:00:00 2001
7dac0e
From: Andy Grover <agrover@redhat.com>
7dac0e
Date: Wed, 17 May 2017 09:37:59 -0700
7dac0e
Subject: [PATCH] Fix exception in convert_scsi_hctl_to_path
7dac0e
7dac0e
Convert integers to string before using them with .join().
7dac0e
7dac0e
Signed-off-by: Andy Grover <agrover@redhat.com>
7dac0e
---
7dac0e
 rtslib/utils.py | 2 +-
7dac0e
 1 file changed, 1 insertion(+), 1 deletion(-)
7dac0e
7dac0e
diff --git a/rtslib/utils.py b/rtslib/utils.py
7dac0e
index 1a5315e..eeb1f6c 100644
7dac0e
--- a/rtslib/utils.py
7dac0e
+++ b/rtslib/utils.py
7dac0e
@@ -294,7 +294,7 @@ def convert_scsi_hctl_to_path(host, controller, target, lun):
7dac0e
         raise RTSLibError(
7dac0e
             "The host, controller, target and lun parameter must be integers")
7dac0e
 
7dac0e
-    hctl = [host, controller, target, lun]
7dac0e
+    hctl = [str(host), str(controller), str(target), str(lun)]
7dac0e
     try:
7dac0e
         scsi_device = pyudev.Device.from_name(_CONTEXT, 'scsi', ':'.join(hctl))
7dac0e
     except pyudev.DeviceNotFoundError: