Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Fukász Rómeó Ervin
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
1ea56dfd
authored
May 11, 2016
by
Kálmán Viktor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vm: fix vm state changed to XY on None message
parent
cb2d9cff
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
+8
-3
circle/vm/models/instance.py
+8
-3
No files found.
circle/vm/models/instance.py
View file @
1ea56dfd
...
...
@@ -447,12 +447,17 @@ class Instance(AclBase, VirtualMachineDescModel, StatusModel, OperatedMixin,
if
new_node
is
False
:
# None would be a valid value
new_node
=
self
.
node
# log state change
if
new_node
:
msg
=
ugettext_noop
(
"vm state changed to
%(state)
s on
%(node)
s"
)
else
:
msg
=
ugettext_noop
(
"vm state changed to
%(state)
s"
)
try
:
act
=
InstanceActivity
.
create
(
code_suffix
=
'vm_state_changed'
,
readable_name
=
create_readable
(
ugettext_noop
(
"vm state changed to
%(state)
s on
%(node)
s"
),
state
=
new_state
,
node
=
new_node
),
readable_name
=
create_readable
(
msg
,
state
=
new_state
,
node
=
new_node
),
instance
=
self
)
except
ActivityInProgressError
:
pass
# discard state change if another activity is in progress.
...
...
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