From: Lucas Meneghel Rodrigues <lmr@redhat.com>
To: autotest@test.kernel.org
Cc: kvm@vger.kernel.org
Subject: [PATCH 3/4] frontend.afe.resources: Fixing undefined variable error
Date: Fri, 6 May 2011 19:24:13 -0300 [thread overview]
Message-ID: <1304720654-3724-3-git-send-email-lmr@redhat.com> (raw)
In-Reply-To: <1304720654-3724-1-git-send-email-lmr@redhat.com>
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
next prev parent reply other threads:[~2011-05-06 22:24 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2011-05-06 22:24 ` [PATCH 4/4] mirror.config-sample: " 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=1304720654-3724-3-git-send-email-lmr@redhat.com \
--to=lmr@redhat.com \
--cc=autotest@test.kernel.org \
--cc=kvm@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox