commit 087fda7efa313aba7eaad03d16205f13864f432e
Author: Jan Tluka <jtluka(a)redhat.com>
Date: Thu Mar 28 17:47:16 2013 +0100
Removing flags from sub
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 files changed, 1 insertions(+), 1 deletions(-)
---
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]
Show replies by date