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

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