[Testbot] Plone 4.3 - Python 2.6 - Build # 2040 - Regression! - 4 failure(s)
jenkins at plone.org
jenkins at plone.org
Fri May 2 07:57:45 UTC 2014
-------------------------------------------------------------------------------
Plone 4.3 - Python 2.6 - Build # 2040 - Failure!
-------------------------------------------------------------------------------
http://jenkins.plone.org/job/plone-4.3-python-2.6/2040/
-------------------------------------------------------------------------------
CHANGES
-------------------------------------------------------------------------------
Repository: Products.Archetypes
Branch: refs/heads/1.9.x
Date: 2014-05-02T09:08:35+02:00
Author: Robert Niederreiter (rnixx) <office at squarewave.at>
Commit: https://github.com/plone/Products.Archetypes/commit/a37a878db7cf918c5d07c1ae8450a26658837ab2
do not fail if float delimiter is comma
Files changed:
M Products/Archetypes/Field.py
diff --git a/Products/Archetypes/Field.py b/Products/Archetypes/Field.py
index aaa0a9f..c87c8a8 100644
--- a/Products/Archetypes/Field.py
+++ b/Products/Archetypes/Field.py
@@ -1691,7 +1691,7 @@ def set(self, instance, value, **kwargs):
elif value is not None:
# should really blow if value is not valid
__traceback_info__ = (self.getName(), instance, value, kwargs)
- value = float(value)
+ value = float(value.replace(',', '.'))
ObjectField.set(self, instance, value, **kwargs)
Repository: Products.Archetypes
Branch: refs/heads/1.9.x
Date: 2014-05-02T09:13:04+02:00
Author: Robert Niederreiter (rnixx) <office at squarewave.at>
Commit: https://github.com/plone/Products.Archetypes/commit/b10dd37ecd633bc1629c0a36dbcd78729ac900c6
merge "add test for comma seperated float value"
Files changed:
M Products/Archetypes/tests/test_fields.py
diff --git a/Products/Archetypes/tests/test_fields.py b/Products/Archetypes/tests/test_fields.py
index b042073..0ec3d7e 100644
--- a/Products/Archetypes/tests/test_fields.py
+++ b/Products/Archetypes/tests/test_fields.py
@@ -58,12 +58,14 @@
('LinesField', 'linesfield'),
('IntegerField', 'integerfield'),
('FloatField', 'floatfield'),
+ ('FloatField', 'floatfield2'),
('FixedPointField', 'fixedpointfield1'),
('FixedPointField', 'fixedpointfield2'),
('BooleanField', 'booleanfield'),
('ImageField', 'imagefield'),
]
+
field_instances = []
for type, name in test_fields:
field_instances.append(getattr(at_field, type)(name))
@@ -90,6 +92,7 @@
'linesfield': 'bla\nbla',
'integerfield': '1',
'floatfield': '1.5',
+ 'floatfield2': '1,2',
'fixedpointfield1': '1.5',
'fixedpointfield2': '1,5',
'booleanfield': '1',
@@ -104,6 +107,7 @@
'linesfield': ('bla', 'bla'),
'integerfield': 1,
'floatfield': 1.5,
+ 'floatfield2': 1.2,
'fixedpointfield1': '1.50',
'fixedpointfield2': '1.50',
'booleanfield': 1,
@@ -119,6 +123,7 @@
'linesfield': (),
'integerfield': None,
'floatfield': None,
+ 'floatfield2': None,
'fixedpointfield1': None,
'fixedpointfield2': None,
'booleanfield': None,
Repository: Products.Archetypes
Branch: refs/heads/1.9.x
Date: 2014-05-02T09:13:33+02:00
Author: Robert Niederreiter (rnixx) <office at squarewave.at>
Commit: https://github.com/plone/Products.Archetypes/commit/7f824479b953d0d7c061c612d4e7b86e7426c6ca
only fiddle comma if value is basestring
Files changed:
M Products/Archetypes/Field.py
diff --git a/Products/Archetypes/Field.py b/Products/Archetypes/Field.py
index c87c8a8..b5dc9ac 100644
--- a/Products/Archetypes/Field.py
+++ b/Products/Archetypes/Field.py
@@ -1691,7 +1691,9 @@ def set(self, instance, value, **kwargs):
elif value is not None:
# should really blow if value is not valid
__traceback_info__ = (self.getName(), instance, value, kwargs)
- value = float(value.replace(',', '.'))
+ if isinstance(value, basestring):
+ value = value.replace(',', '.')
+ value = float(value)
ObjectField.set(self, instance, value, **kwargs)
-------------------------------------------------------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: CHANGES.log
Type: application/octet-stream
Size: 3644 bytes
Desc: not available
URL: <http://lists.plone.org/pipermail/plone-testbot/attachments/20140502/cd24b800/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: build.log
Type: application/octet-stream
Size: 162610 bytes
Desc: not available
URL: <http://lists.plone.org/pipermail/plone-testbot/attachments/20140502/cd24b800/attachment-0003.obj>
More information about the Testbot
mailing list