Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 884824 Details for
Bug 1086166
resubmit-task should allow --force flag
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
patch
0004-allow-force-in-resubmit-tasks-CLI-command.patch (text/plain), 2.22 KB, created by
Tomas Kopecek
on 2014-04-10 09:34:35 UTC
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Tomas Kopecek
Created:
2014-04-10 09:34:35 UTC
Size:
2.22 KB
patch
obsolete
>From 3f70dd9fc2b9e54e4724d038dad902089724617d Mon Sep 17 00:00:00 2001 >From: Tomas Kopecek <tkopecek@redhat.com> >Date: Thu, 10 Apr 2014 11:33:41 +0200 >Subject: [PATCH 4/4] allow --force in resubmit-tasks CLI command > >--- > kobo/client/commands/cmd_resubmit_tasks.py | 3 ++- > kobo/hub/models.py | 4 ++-- > 2 files changed, 4 insertions(+), 3 deletions(-) > >diff --git a/kobo/client/commands/cmd_resubmit_tasks.py b/kobo/client/commands/cmd_resubmit_tasks.py >index 4abde23..6eec6a3 100644 >--- a/kobo/client/commands/cmd_resubmit_tasks.py >+++ b/kobo/client/commands/cmd_resubmit_tasks.py >@@ -14,6 +14,7 @@ class Resubmit_Tasks(ClientCommand): > > def options(self): > self.parser.usage = "%%prog %s task_id [task_id...]" % self.normalized_name >+ self.parser.add_option("--force", action="store_true", help="Resubmit also tasks which are closed properly.") > > > def run(self, *args, **kwargs): >@@ -30,7 +31,7 @@ class Resubmit_Tasks(ClientCommand): > failed = False > for task_id in tasks: > try: >- resubmitted_id = self.hub.client.resubmit_task(task_id) >+ resubmitted_id = self.hub.client.resubmit_task(task_id, kwargs.pop("force", False)) > resubmitted_tasks.append(resubmitted_id) > except Exception, ex: > failed = True >diff --git a/kobo/hub/models.py b/kobo/hub/models.py >index f8cc60a..456650b 100644 >--- a/kobo/hub/models.py >+++ b/kobo/hub/models.py >@@ -737,7 +737,7 @@ WHERE > """Is the task successfuly finished? Task state must be closed.""" > return self.state in FAILED_STATES > >- def resubmit_task(self, user): >+ def resubmit_task(self, user, force=False): > """Resubmit failed/canceled top-level task.""" > if not user.is_superuser: > if self.owner.username != user.username: >@@ -749,7 +749,7 @@ WHERE > if self.exclusive: > raise Exception("Cannot resubmit exclusive task: %s" % self.id) > >- if self.state not in FAILED_STATES: >+ if not force and self.state not in FAILED_STATES: > states = [ TASK_STATES.get_value(i) for i in FAILED_STATES ] > raise Exception("Task '%s' must be in: %s" % (self.id, states)) > >-- >1.9.0 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1086166
: 884824