Using flags parameter in re.sub() was added in Python 2.7. I'd like to
be able use LNST on RHEL6 that's coming with Python 2.6.
Signed-off-by: Jan Tluka <jtluka(a)redhat.com>
---
lnst/Controller/SlavePool.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lnst/Controller/SlavePool.py b/lnst/Controller/SlavePool.py
index e430bbe..8470190 100644
--- a/lnst/Controller/SlavePool.py
+++ b/lnst/Controller/SlavePool.py
@@ -58,7 +58,7 @@ class SlavePool:
parser.disable_events()
machine = {"params": {}, "netdevices": {}}
- machine_id = re.sub("\.xml$", "", basename, flags=re.I)
+ machine_id = re.sub("\.[xX][mM][lL]$", "", basename)
parser.set_machine(machine_id, machine)
slavemachine = dom.getElementsByTagName("slavemachine")[0]
--
1.7.11.7
Show replies by date