Skip to content

Commit

Permalink
Fixed expressions token replacing braces
Browse files Browse the repository at this point in the history
  • Loading branch information
marinho committed Jun 17, 2010
1 parent b1c64bc commit 0448346
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 3 deletions.
8 changes: 8 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
2010-06-17: Version 0.4.5-stable
--------------------------------
* Fixed expressions token replacing braces

2010-06-17: Version 0.4.4-stable
--------------------------------
* Fixed bug on complex expressions with braces

2010-05-06: Version 0.4.3-stable
--------------------------------
* Fixed cross reference matrix and expressions to avoid use existing object as dictionary
Expand Down
2 changes: 1 addition & 1 deletion geraldo/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
- tests - a package with automated doc tests.
"""

VERSION = (0, 4, 4, 'stable')
VERSION = (0, 4, 5, 'stable')

def get_version():
return '%d.%d.%d-%s'%VERSION
Expand Down
3 changes: 2 additions & 1 deletion geraldo/widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ def clone(self):
return new

EXP_QUOTED = re.compile('\w\(([^\'"].+?[^\'"])(|,.*?)\)')
EXP_QUOTED_SUB = re.compile('\(([^\'"].+?[^\'"])(|,.*?)\)')
EXP_TOKENS = re.compile('([\w\._]+|\*\*|\+|\-|\*|\/)')

class ObjectValue(Label):
Expand Down Expand Up @@ -129,7 +130,7 @@ def prepare_expression(self):
self.expression = 'value("%s")' % self.expression
break

self.expression = EXP_QUOTED.sub('("%s"%s)'%(f[0][0], f[0][1]), self.expression, 1)
self.expression = EXP_QUOTED_SUB.sub('("%s"%s)'%(f[0][0], f[0][1]), self.expression, 1)

def get_object_value(self, instance=None, attribute_name=None):
"""Return the attribute value for just an object"""
Expand Down
2 changes: 1 addition & 1 deletion pypi_upload.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/bash
python setup.py sdist upload
python setup.py bdist upload
#python setup.py bdist upload

0 comments on commit 0448346

Please sign in to comment.