Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
itminedu
synnefo
Commits
a9119b86
Commit
a9119b86
authored
Sep 13, 2013
by
Christos Stavrakakis
Browse files
cyclades: Simplify code
Simplify code by removing unnecessary temp variable.
parent
9b94fc30
Changes
1
Hide whitespace changes
Inline
Side-by-side
snf-cyclades-app/synnefo/logic/backend.py
View file @
a9119b86
...
...
@@ -100,12 +100,11 @@ def process_op_status(vm, etime, jobid, opcode, status, logmsg, nics=None):
if
status
==
"success"
or
(
status
==
"error"
and
not
vm_exists_in_backend
(
vm
)):
_process_net_status
(
vm
,
etime
,
nics
=
[])
already_deleted
=
vm
.
deleted
vm
.
deleted
=
True
vm
.
operstate
=
state_for_success
vm
.
backendtime
=
etime
# Issue and accept commission to Quotaholder
if
not
already_deleted
:
if
not
vm
.
deleted
:
vm
.
deleted
=
True
# Issue and accept commission to Quotaholder
quotas
.
issue_and_accept_commission
(
vm
,
delete
=
True
)
# the above has already saved the object and committed;
# a second save would override others' changes, since the
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment