Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gelencsér Szabolcs
/
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
db51287a
authored
Mar 15, 2014
by
Bach Dániel
Committed by
Bach Dániel
Mar 15, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove 'is True' statements
parent
01eb957e
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
5 deletions
+4
-5
circle/dashboard/forms.py
+1
-1
circle/vm/models/instance.py
+1
-2
circle/vm/models/node.py
+2
-2
No files found.
circle/dashboard/forms.py
View file @
db51287a
...
...
@@ -751,7 +751,7 @@ class DiskAddForm(forms.Form):
self
.
object_pk
=
kwargs
.
pop
(
"object_pk"
)
self
.
user
=
kwargs
.
pop
(
"user"
)
super
(
DiskAddForm
,
self
)
.
__init__
(
*
args
,
**
kwargs
)
self
.
initial
[
'is_template'
]
=
1
if
self
.
is_template
is
True
else
0
self
.
initial
[
'is_template'
]
=
1
if
self
.
is_template
else
0
self
.
initial
[
'object_pk'
]
=
self
.
object_pk
def
clean_size
(
self
):
...
...
circle/vm/models/instance.py
View file @
db51287a
...
...
@@ -801,10 +801,9 @@ class Instance(AclBase, VirtualMachineDescModel, TimeStampedModel):
queue
=
queue_name
)
.
get
(
timeout
=
timeout
)
except
Exception
as
e
:
if
e
.
libvirtError
is
True
and
"Domain not found"
in
str
(
e
):
if
e
.
libvirtError
and
"Domain not found"
in
str
(
e
):
logger
.
debug
(
"Domain
%
s was not found at
%
s"
%
(
self
.
vm_name
,
queue_name
))
pass
else
:
raise
...
...
circle/vm/models/node.py
View file @
db51287a
...
...
@@ -92,7 +92,7 @@ class Node(TimeStampedModel):
def
disable
(
self
,
user
=
None
):
''' Disable the node.'''
if
self
.
enabled
is
True
:
if
self
.
enabled
:
with
node_activity
(
code_suffix
=
'disable'
,
node
=
self
,
user
=
user
):
self
.
enabled
=
False
self
.
save
()
...
...
@@ -132,7 +132,7 @@ class Node(TimeStampedModel):
self
.
node_online
()
return
self
.
host
.
hostname
+
"."
+
queue_id
else
:
if
self
.
enabled
is
True
:
if
self
.
enabled
:
self
.
node_offline
()
raise
WorkerNotFound
()
...
...
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