Re: [KVM-AUTOTEST PATCH] bugfix for changing kvm_log to logging

Lucas Meneghel Rodrigues
2009-07-01T03:24:24Z

Applied, with minimum changes

On Thu, 2009-06-25 at 23:54 +0800, Yolkfull Chow wrote:
> diff --git a/client/tests/kvm/kvm.py b/client/tests/kvm/kvm.py
> index 4c7bae4..26ae46f 100644
> --- a/client/tests/kvm/kvm.py
> +++ b/client/tests/kvm/kvm.py
> @@ -73,7 +73,7 @@ class kvm(test.test):
> resource.setrlimit(resource.RLIMIT_CORE, (-1, -1))
>
> # Set the logging prefix
> - #kvm_log.set_prefix(params.get("shortname"))
> + #logging.set_prefix(params.get("shortname"))

This line was commented, the logging module does not have a set_prefix
function. Therefore, the line was just removed.

> # Report the parameters we've received and write them as keyvals
> logging.debug("Test parameters:")
> diff --git a/client/tests/kvm/kvm_utils.py b/client/tests/kvm/kvm_utils.py
> index 4bc8dc7..a37d322 100644
> --- a/client/tests/kvm/kvm_utils.py
> +++ b/client/tests/kvm/kvm_utils.py
> @@ -670,7 +670,7 @@ def remote_login(command, password, prompt,
> linesep="\n", timeout=10):
> sub.close()
> return None
> elif match == 4: # "Connection refused"
> - kvm_log.debug("Got 'Connection refused'")
> + logging.debug("Got 'Connection refused'")
> sub.close()
> return None
> elif match == 5: # prompt