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