Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.buildout
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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Nicolas Wavrant
slapos.buildout
Commits
bd18a174
Commit
bd18a174
authored
Dec 04, 2012
by
Cédric de Saint Martin
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'serialisation'
parents
9f09b7b4
f1e4a501
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
0 deletions
+16
-0
src/zc/buildout/buildout.py
src/zc/buildout/buildout.py
+16
-0
No files found.
src/zc/buildout/buildout.py
View file @
bd18a174
...
@@ -71,6 +71,8 @@ class BuildoutSerialiser(object):
...
@@ -71,6 +71,8 @@ class BuildoutSerialiser(object):
'list'
:
list
,
'list'
:
list
,
'str'
:
str
,
'str'
:
str
,
'tuple'
:
tuple
,
'tuple'
:
tuple
,
'False'
:
False
,
'True'
:
True
,
}}
}}
def
loads
(
self
,
value
):
def
loads
(
self
,
value
):
...
@@ -1599,6 +1601,20 @@ class Options(UserDict.DictMixin):
...
@@ -1599,6 +1601,20 @@ class Options(UserDict.DictMixin):
"""
"""
return
_convert_bool
(
name
,
self
[
name
])
return
_convert_bool
(
name
,
self
[
name
])
def
__eq__
(
self
,
other
):
"""Because __cmp__ calls cmp(self, other)
and if self contains set instance, it fails.
"""
if
isinstance
(
other
,
(
UserDict
.
DictMixin
,
dict
)):
for
item_self
,
item_other
in
itertools
.
izip_longest
(
self
.
iteritems
(),
other
.
iteritems
()):
if
item_self
!=
item_other
:
return
False
return
True
else
:
return
super
(
Options
,
self
).
__eq__
(
other
)
def
_convert_bool
(
name
,
value
):
def
_convert_bool
(
name
,
value
):
if
value
not
in
(
'true'
,
'false'
):
if
value
not
in
(
'true'
,
'false'
):
...
...
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