diff mbox

KVM Test: Drop sre module in script and use re module.

Message ID 1312442404-6797-1-git-send-email-fyang@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Feng Yang Aug. 4, 2011, 7:20 a.m. UTC
From: Feng Yang <fyang@redhat.com>

sre moudle have been deprecated in python 2.6

Signed-off-by: Feng Yang <fyang@redhat.com>
---
 client/virt/virt_test_setup.py |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

Comments

Lucas Meneghel Rodrigues Aug. 4, 2011, 3:32 p.m. UTC | #1
On Thu, Aug 4, 2011 at 4:20 AM,  <fyang@redhat.com> wrote:
> From: Feng Yang <fyang@redhat.com>

Looks good to me, applied, thanks!

http://autotest.kernel.org/changeset/5522

> sre moudle have been deprecated in python 2.6
>
> Signed-off-by: Feng Yang <fyang@redhat.com>
> ---
>  client/virt/virt_test_setup.py |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/client/virt/virt_test_setup.py b/client/virt/virt_test_setup.py
> index 1539cac..f2ff38b 100644
> --- a/client/virt/virt_test_setup.py
> +++ b/client/virt/virt_test_setup.py
> @@ -1,7 +1,7 @@
>  """
>  Library to perform pre/post test setup for KVM autotest.
>  """
> -import os, logging, time, re, sre, random
> +import os, logging, time, re, random
>  from autotest_lib.client.common_lib import error
>  from autotest_lib.client.bin import utils
>
> @@ -60,7 +60,7 @@ class TransparentHugePageConfig(object):
>             tmp_list = re.split(';', test_config)
>         while len(tmp_list) > 0:
>             tmp_cfg = tmp_list.pop()
> -            test_cfg[re.split(":", tmp_cfg)[0]] = sre.split(":", tmp_cfg)[1]
> +            test_cfg[re.split(":", tmp_cfg)[0]] = re.split(":", tmp_cfg)[1]
>         # Save host current config, so we can restore it during cleanup
>         # We will only save the writeable part of the config files
>         original_config = {}
> --
> 1.7.1
>
> _______________________________________________
> Autotest mailing list
> Autotest@test.kernel.org
> http://test.kernel.org/cgi-bin/mailman/listinfo/autotest
>
diff mbox

Patch

diff --git a/client/virt/virt_test_setup.py b/client/virt/virt_test_setup.py
index 1539cac..f2ff38b 100644
--- a/client/virt/virt_test_setup.py
+++ b/client/virt/virt_test_setup.py
@@ -1,7 +1,7 @@ 
 """
 Library to perform pre/post test setup for KVM autotest.
 """
-import os, logging, time, re, sre, random
+import os, logging, time, re, random
 from autotest_lib.client.common_lib import error
 from autotest_lib.client.bin import utils
 
@@ -60,7 +60,7 @@  class TransparentHugePageConfig(object):
             tmp_list = re.split(';', test_config)
         while len(tmp_list) > 0:
             tmp_cfg = tmp_list.pop()
-            test_cfg[re.split(":", tmp_cfg)[0]] = sre.split(":", tmp_cfg)[1]
+            test_cfg[re.split(":", tmp_cfg)[0]] = re.split(":", tmp_cfg)[1]
         # Save host current config, so we can restore it during cleanup
         # We will only save the writeable part of the config files
         original_config = {}