Skip to content

Commit

Permalink
Merge 5421adc into 5931d36
Browse files Browse the repository at this point in the history
  • Loading branch information
rcfox committed Dec 16, 2015
2 parents 5931d36 + 5421adc commit 34fb5c5
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions suitcase/fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import six
from suitcase.exceptions import SuitcaseChecksumException, SuitcaseProgrammingError, \
SuitcaseParseError, SuitcaseException, SuitcasePackStructException
import suitcase
from six import BytesIO, StringIO


Expand Down Expand Up @@ -831,6 +832,12 @@ def unpack(self, data, **kwargs):
self._value = self.substructure()
return self._value.unpack(data, **kwargs)

def setval(self, value):
if value is None or isinstance(value, suitcase.structure.Structure):
BaseField.setval(self, value)
else:
self._value.setval(value)


class FieldArray(BaseField):
"""Field which contains a list of some other field.
Expand Down

0 comments on commit 34fb5c5

Please sign in to comment.