All of lore.kernel.org
 help / color / mirror / Atom feed
From: Amos Kong <akong@redhat.com>
To: autotest@test.kernel.org, kvm@vger.kernel.org
Cc: lmr@redhat.com
Subject: [KVM-AUTOTEST PATCH] fix an error of undefine variable
Date: Wed, 23 Sep 2009 10:32:45 +0800	[thread overview]
Message-ID: <20090923023245.GA15693@dhcp-66-70-48.nay.redhat.com> (raw)
In-Reply-To: <1253672180-22742-1-git-send-email-akong@redhat.com>


Sorry for lost autotest@test.kernel.org. So send again. Thanks.
------------------------------------------------------
fix an error of undefine variable

09/23 09:50:27 ERROR| traceback:0013|   File "/usr/lib64/python2.4/logging/__init__.py", line 744, in emit
09/23 09:50:27 ERROR| traceback:0013|     self.handleError(record)
09/23 09:50:27 ERROR| traceback:0013|   File "/root/project/autotest/client/setup_modules.py", line 86, in _autotest_logging_handle_error
09/23 09:50:27 ERROR| traceback:0013|     traceback.print_stack()
09/23 09:50:27 ERROR|setup_modu:0087| Future logging formatting exceptions disabled.
09/23 09:50:27 ERROR|       kvm:0067| Test failed: global name 'root_module_name' is not defined

Signed-off-by: Amos Kong <akong@redhat.com>
---
 client/setup_modules.py |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/client/setup_modules.py b/client/setup_modules.py
index dc255c4..8b3200b 100644
--- a/client/setup_modules.py
+++ b/client/setup_modules.py
@@ -86,7 +86,7 @@ def _autotest_logging_handle_error(self, record):
         traceback.print_stack()
         sys.stderr.write('Future logging formatting exceptions disabled.\n')
 
-    if root_module_name == 'autotest_lib':
+    if global_root_module_name == 'autotest_lib':
         # Allow locally installed third party packages to be found
         # before any that are installed on the system itself when not.
         # running as a client.
@@ -124,6 +124,8 @@ def setup(base_path, root_module_name=""):
     The setup must be different if you are running on an Autotest server
     or on a test machine that just has the client directories installed.
     """
+    global global_root_module_name
+    global_root_module_name = root_module_name
     # Hack... Any better ideas?
     if (root_module_name == 'autotest_lib.client' and
         os.path.exists(os.path.join(os.path.dirname(__file__),
-- 
1.5.5.6


  reply	other threads:[~2009-09-23  2:34 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-23  2:16 [PATCH] fix an error of undefine variable Amos Kong
2009-09-23  2:32 ` Amos Kong [this message]
2009-10-05 17:49   ` [Autotest] [KVM-AUTOTEST PATCH] " Lucas Meneghel Rodrigues

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090923023245.GA15693@dhcp-66-70-48.nay.redhat.com \
    --to=akong@redhat.com \
    --cc=autotest@test.kernel.org \
    --cc=kvm@vger.kernel.org \
    --cc=lmr@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.