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

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