Skip to content

Commit

Permalink
Fixed SequenceValue to work on Python 3.x.
Browse files Browse the repository at this point in the history
  • Loading branch information
jezdez committed Feb 13, 2015
1 parent 4d35ad3 commit c60b7da
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions configurations/values.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ def _convert(self, sequence):
def to_python(self, value):
split_value = [v.strip() for v in value.strip().split(self.separator)]
# removing empty items
value_list = filter(None, split_value)
value_list = self.sequence_type(filter(None, split_value))
if self.converter is not None:
value_list = self._convert(value_list)
return self.sequence_type(value_list)
Expand Down Expand Up @@ -249,7 +249,7 @@ def to_python(self, value):
v.strip() for v in value.strip().split(self.seq_separator)
]
# Remove empty items
filtered = filter(None, split_value)
filtered = self.sequence_type(filter(None, split_value))
sequence = [
super(SingleNestedSequenceValue, self).to_python(f) for f in filtered
]
Expand Down

0 comments on commit c60b7da

Please sign in to comment.