Change in vdsm[master]: jobs: Keep same order of constants for consistency
nsoffer at redhat.com
nsoffer at redhat.com
Tue Dec 15 10:07:42 UTC 2015
Nir Soffer has uploaded a new change for review.
Change subject: jobs: Keep same order of constants for consistency
......................................................................
jobs: Keep same order of constants for consistency
Reorder the constants according to job normal lifecyle, and use the same
order in the module.
Change-Id: I8208bec91591405d2e49f6f6dac121973db03031
Signed-off-by: Nir Soffer <nsoffer at redhat.com>
---
M lib/vdsm/jobs.py
1 file changed, 2 insertions(+), 2 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/01/50501/1
diff --git a/lib/vdsm/jobs.py b/lib/vdsm/jobs.py
index 3be8f60..586e941 100644
--- a/lib/vdsm/jobs.py
+++ b/lib/vdsm/jobs.py
@@ -29,9 +29,9 @@
class STATUS:
RUNNING = 'running' # Job is running
+ DONE = 'done' # Job has finished successfully
ABORTED = 'aborted' # Job was aborted by user request
FAILED = 'error' # Job has failed
- DONE = 'done' # Job has finished successfully
class ClientError(Exception):
@@ -105,7 +105,7 @@
raise JobNotDone("Job %r is %s" % (self.id, self.status))
def validate_not_running(self):
- if self.status not in (STATUS.DONE, STATUS.FAILED, STATUS.ABORTED):
+ if self.status not in (STATUS.DONE, STATUS.ABORTED, STATUS.FAILED):
raise JobNotDone("Job %r is %s" % (self.id, self.status))
def _abort(self):
--
To view, visit https://gerrit.ovirt.org/50501
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I8208bec91591405d2e49f6f6dac121973db03031
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsoffer at redhat.com>
More information about the vdsm-patches
mailing list