Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jérome Perrin
slapos.core
Commits
15163703
Commit
15163703
authored
Apr 30, 2013
by
Cédric de Saint Martin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
No need for 'else' clause.
parent
14a63810
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
16 deletions
+15
-16
slapos/slap/slap.py
slapos/slap/slap.py
+15
-16
No files found.
slapos/slap/slap.py
View file @
15163703
...
@@ -89,22 +89,21 @@ class SlapRequester(SlapDocument):
...
@@ -89,22 +89,21 @@ class SlapRequester(SlapDocument):
request_dict
=
request_dict
,
request_dict
=
request_dict
,
connection_helper
=
self
.
_connection_helper
,
connection_helper
=
self
.
_connection_helper
,
)
)
else
:
xml
=
self
.
_connection_helper
.
response
.
read
()
xml
=
self
.
_connection_helper
.
response
.
read
()
software_instance
=
xml_marshaller
.
loads
(
xml
)
software_instance
=
xml_marshaller
.
loads
(
xml
)
computer_partition
=
ComputerPartition
(
computer_partition
=
ComputerPartition
(
software_instance
.
slap_computer_id
.
encode
(
'UTF-8'
),
software_instance
.
slap_computer_id
.
encode
(
'UTF-8'
),
software_instance
.
slap_computer_partition_id
.
encode
(
'UTF-8'
),
software_instance
.
slap_computer_partition_id
.
encode
(
'UTF-8'
),
connection_helper
=
self
.
_connection_helper
,
connection_helper
=
self
.
_connection_helper
,
)
)
# Hack to give all object attributes to the ComputerPartition instance
# Hack to give all object attributes to the ComputerPartition instance
computer_partition
.
__dict__
=
software_instance
.
__dict__
.
copy
()
computer_partition
.
__dict__
=
software_instance
.
__dict__
.
copy
()
# XXX not generic enough.
# XXX not generic enough.
if
xml_marshaller
.
loads
(
request_dict
[
'shared_xml'
]):
if
xml_marshaller
.
loads
(
request_dict
[
'shared_xml'
]):
computer_partition
.
_synced
=
True
computer_partition
.
_synced
=
True
computer_partition
.
_connection_dict
=
software_instance
.
_connection_dict
computer_partition
.
_connection_dict
=
software_instance
.
_connection_dict
computer_partition
.
_parameter_dict
=
software_instance
.
_parameter_dict
computer_partition
.
_parameter_dict
=
software_instance
.
_parameter_dict
return
computer_partition
return
computer_partition
class
SoftwareRelease
(
SlapDocument
):
class
SoftwareRelease
(
SlapDocument
):
...
...
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