equal
deleted
inserted
replaced
722 except KeyError: |
722 except KeyError: |
723 # raise UnmodifiedField instead of returning None, since the later |
723 # raise UnmodifiedField instead of returning None, since the later |
724 # will try to remove already attached file if any |
724 # will try to remove already attached file if any |
725 raise UnmodifiedField() |
725 raise UnmodifiedField() |
726 # value is a 2-uple (filename, stream) |
726 # value is a 2-uple (filename, stream) |
727 filename, stream = value |
727 try: |
|
728 filename, stream = value |
|
729 except ValueError: |
|
730 raise UnmodifiedField() |
728 # XXX avoid in memory loading of posted files. Requires Binary handling changes... |
731 # XXX avoid in memory loading of posted files. Requires Binary handling changes... |
729 value = Binary(stream.read()) |
732 value = Binary(stream.read()) |
730 if not value.getvalue(): # usually an unexistant file |
733 if not value.getvalue(): # usually an unexistant file |
731 value = None |
734 value = None |
732 else: |
735 else: |