Blame SOURCES/bz1851115-fence_mpath-support-comma-and-space-separated-devices.patch

92e554
From 2d0057dabae0b4cd4394fec5a60a3f649c8e3d2b Mon Sep 17 00:00:00 2001
92e554
From: Oyvind Albrigtsen <oalbrigt@redhat.com>
92e554
Date: Wed, 1 Jul 2020 13:18:26 +0200
92e554
Subject: [PATCH] fence_mpath: allow spaces for comma-separated devices and add
92e554
 support for space-separated devices
92e554
92e554
---
92e554
 agents/mpath/fence_mpath.py | 2 +-
92e554
 1 file changed, 1 insertion(+), 1 deletion(-)
92e554
92e554
diff --git a/agents/mpath/fence_mpath.py b/agents/mpath/fence_mpath.py
92e554
index a3d9fe23..bc15aae2 100644
92e554
--- a/agents/mpath/fence_mpath.py
92e554
+++ b/agents/mpath/fence_mpath.py
92e554
@@ -297,7 +297,7 @@ def main():
92e554
 	if not ("--devices" in options and options["--devices"]):
92e554
 		fail_usage("Failed: No devices found")
92e554
 
92e554
-	options["devices"] = options["--devices"].split(",")
92e554
+	options["devices"] = [d for d in re.split("\s*,\s*|\s+", options["--devices"].strip()) if d]
92e554
 	# Input control END
92e554
 
92e554
 	result = fence_action(None, options, set_status, get_status)