All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/4] frontend.shared.rest_client: Fix reference to an undefined variable
@ 2011-05-06 22:24 Lucas Meneghel Rodrigues
  2011-05-06 22:24 ` [PATCH 2/4] frontend.afe.models: Fixing undefined variable error Lucas Meneghel Rodrigues
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Lucas Meneghel Rodrigues @ 2011-05-06 22:24 UTC (permalink / raw)
  To: autotest; +Cc: kvm

The author forgot to reference self, calling the method _http.request
of the ResponseObject class.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
---
 frontend/shared/rest_client.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/frontend/shared/rest_client.py b/frontend/shared/rest_client.py
index 9c4f5d5..7294e40 100644
--- a/frontend/shared/rest_client.py
+++ b/frontend/shared/rest_client.py
@@ -143,7 +143,7 @@ class Resource(object):
             logging.debug('Response verification failed, clearing headers and '
                           'trying again:\n%s', response_body)
             _clear_request_headers(uri)
-            headers, response_body = _http.request(
+            headers, response_body = self._http.request(
                 full_uri, method, body=entity_body,
                 headers=_get_request_headers(uri))
 
-- 
1.7.5

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/4] frontend.afe.models: Fixing undefined variable error
  2011-05-06 22:24 [PATCH 1/4] frontend.shared.rest_client: Fix reference to an undefined variable Lucas Meneghel Rodrigues
@ 2011-05-06 22:24 ` Lucas Meneghel Rodrigues
  2011-05-06 22:24 ` [PATCH 3/4] frontend.afe.resources: " Lucas Meneghel Rodrigues
  2011-05-06 22:24 ` [PATCH 4/4] mirror.config-sample: " Lucas Meneghel Rodrigues
  2 siblings, 0 replies; 4+ messages in thread
From: Lucas Meneghel Rodrigues @ 2011-05-06 22:24 UTC (permalink / raw)
  To: autotest; +Cc: kvm

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
---
 frontend/afe/models.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/frontend/afe/models.py b/frontend/afe/models.py
index 33ffb8c..cfaa836 100644
--- a/frontend/afe/models.py
+++ b/frontend/afe/models.py
@@ -561,7 +561,7 @@ class TestParameter(dbmodels.Model):
         unique_together = ('test', 'name')
 
     def __unicode__(self):
-        return u'%s (%s)' % (self.name, test.name)
+        return u'%s (%s)' % (self.name, self.test.name)
 
 
 class Profiler(dbmodels.Model, model_logic.ModelExtensions):
-- 
1.7.5

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 3/4] frontend.afe.resources: Fixing undefined variable error
  2011-05-06 22:24 [PATCH 1/4] frontend.shared.rest_client: Fix reference to an undefined variable Lucas Meneghel Rodrigues
  2011-05-06 22:24 ` [PATCH 2/4] frontend.afe.models: Fixing undefined variable error Lucas Meneghel Rodrigues
@ 2011-05-06 22:24 ` Lucas Meneghel Rodrigues
  2011-05-06 22:24 ` [PATCH 4/4] mirror.config-sample: " Lucas Meneghel Rodrigues
  2 siblings, 0 replies; 4+ messages in thread
From: Lucas Meneghel Rodrigues @ 2011-05-06 22:24 UTC (permalink / raw)
  To: autotest; +Cc: kvm

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
---
 frontend/afe/resources.py |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/frontend/afe/resources.py b/frontend/afe/resources.py
index eaeeea0..b783115 100644
--- a/frontend/afe/resources.py
+++ b/frontend/afe/resources.py
@@ -1,10 +1,11 @@
 from django import http
-from autotest_lib.frontend.shared import query_lib, resource_lib
+from autotest_lib.frontend.shared import query_lib, resource_lib, exceptions
 from autotest_lib.frontend.afe import control_file, models, rpc_utils
 from autotest_lib.frontend.afe import model_attributes
 from autotest_lib.frontend import thread_local
 from autotest_lib.client.common_lib import host_protections
 
+
 class EntryWithInvalid(resource_lib.InstanceEntry):
     def put(self):
         if self.instance.invalid:
@@ -319,7 +320,7 @@ class Host(EntryWithInvalid):
         if 'platform' in input_dict:
             label = self.resolve_link(input_dict['platform']) .instance
             if not label.platform:
-                raise BadRequest('Label %s is not a platform' % label.name)
+                raise exceptions.BadRequest('Label %s is not a platform' % label.name)
             for label in self.instance.labels.filter(platform=True):
                 self.instance.labels.remove(label)
             self.instance.labels.add(label)
@@ -779,7 +780,7 @@ class QueueEntry(resource_lib.InstanceEntry):
     def update(self, input_dict):
         if 'aborted' in input_dict:
             if input_dict['aborted'] != True:
-                raise BadRequest('"aborted" can only be set to true')
+                raise exceptions.BadRequest('"aborted" can only be set to true')
             query = models.HostQueueEntry.objects.filter(pk=self.instance.pk)
             models.AclGroup.check_abort_permissions(query)
             rpc_utils.check_abort_synchronous_jobs(query)
-- 
1.7.5

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 4/4] mirror.config-sample: Fixing undefined variable error
  2011-05-06 22:24 [PATCH 1/4] frontend.shared.rest_client: Fix reference to an undefined variable Lucas Meneghel Rodrigues
  2011-05-06 22:24 ` [PATCH 2/4] frontend.afe.models: Fixing undefined variable error Lucas Meneghel Rodrigues
  2011-05-06 22:24 ` [PATCH 3/4] frontend.afe.resources: " Lucas Meneghel Rodrigues
@ 2011-05-06 22:24 ` Lucas Meneghel Rodrigues
  2 siblings, 0 replies; 4+ messages in thread
From: Lucas Meneghel Rodrigues @ 2011-05-06 22:24 UTC (permalink / raw)
  To: autotest; +Cc: kvm

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
---
 client/profilers/ftrace/ftrace.py |    1 +
 mirror/config-sample.py           |    4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/client/profilers/ftrace/ftrace.py b/client/profilers/ftrace/ftrace.py
index dd13fff..03c9d84 100644
--- a/client/profilers/ftrace/ftrace.py
+++ b/client/profilers/ftrace/ftrace.py
@@ -5,6 +5,7 @@ Function tracer profiler for autotest.
 """
 import logging, os, signal, time
 from autotest_lib.client.bin import profiler, utils
+from autotest_lib.client.common_lib import error
 
 
 class ftrace(profiler.profiler):
diff --git a/mirror/config-sample.py b/mirror/config-sample.py
index 29e215f..7788aa2 100644
--- a/mirror/config-sample.py
+++ b/mirror/config-sample.py
@@ -88,5 +88,5 @@ _tests_map = {
 
 # now register some trigger actions otherwise nothing will be done for the new
 # kernel versions
-trigger.add_action(trigger_module.map_action(_tests_map, 'kerntest-%s'))
-trigger.add_action(trigger_module.email_action('test@test.com'))
+trigger_module.trigger.add_action(trigger_module.map_action(_tests_map, 'kerntest-%s'))
+trigger_module.trigger.add_action(trigger_module.email_action('test@test.com'))
-- 
1.7.5

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-05-06 22:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-06 22:24 [PATCH 1/4] frontend.shared.rest_client: Fix reference to an undefined variable Lucas Meneghel Rodrigues
2011-05-06 22:24 ` [PATCH 2/4] frontend.afe.models: Fixing undefined variable error Lucas Meneghel Rodrigues
2011-05-06 22:24 ` [PATCH 3/4] frontend.afe.resources: " Lucas Meneghel Rodrigues
2011-05-06 22:24 ` [PATCH 4/4] mirror.config-sample: " Lucas Meneghel Rodrigues

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.