Blame SOURCES/bz1769783-fencing-improve-stdin-quote-parsing.patch

21d5fd
From 82626dbdb12519e95a5df70ae6ae21bc17112f43 Mon Sep 17 00:00:00 2001
21d5fd
From: Oyvind Albrigtsen <oalbrigt@redhat.com>
21d5fd
Date: Wed, 13 Feb 2019 13:28:25 +0100
21d5fd
Subject: [PATCH] fencing: improve stdin parse function
21d5fd
21d5fd
- Remove quotes around stdin parameters for consistency with CLI
21d5fd
parameters and to be able to quote number and time parameters
21d5fd
---
21d5fd
 lib/fencing.py.py | 1 +
21d5fd
 1 file changed, 1 insertion(+)
21d5fd
21d5fd
diff --git a/lib/fencing.py.py b/lib/fencing.py.py
21d5fd
index 287cd01f..8cd0a813 100644
21d5fd
--- a/lib/fencing.py.py
21d5fd
+++ b/lib/fencing.py.py
21d5fd
@@ -1389,6 +1389,7 @@ def _parse_input_stdin(avail_opt):
21d5fd
 
21d5fd
 		(name, value) = (line + "=").split("=", 1)
21d5fd
 		value = value[:-1]
21d5fd
+		value = re.sub("^\"(.*)\"$", "\\1", value)
21d5fd
 
21d5fd
 		if name.replace("-", "_") in mapping_longopt_names:
21d5fd
 			name = mapping_longopt_names[name.replace("-", "_")]