equal
deleted
inserted
replaced
120 accessed |
120 accessed |
121 """ |
121 """ |
122 fpath = source.binary_to_str(value) |
122 fpath = source.binary_to_str(value) |
123 try: |
123 try: |
124 return Binary(file(fpath, 'rb').read()) |
124 return Binary(file(fpath, 'rb').read()) |
125 except OSError, ex: |
125 except EnvironmentError, ex: |
126 source.critical("can't open %s: %s", value, ex) |
126 source.critical("can't open %s: %s", value, ex) |
127 return None |
127 return None |
128 |
128 |
129 def entity_added(self, entity, attr): |
129 def entity_added(self, entity, attr): |
130 """an entity using this storage for attr has been added""" |
130 """an entity using this storage for attr has been added""" |