Changeset 13159 for main/waeup.kofa/trunk/src/waeup/kofa/hostels
- Timestamp:
- 10 Jul 2015, 11:33:03 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/hostels/batching.py
r12883 r13159 68 68 """Update obj to the values given in row. 69 69 """ 70 changed = [] 71 for key, value in row.items(): 72 # Skip fields to be ignored. 73 if value == IGNORE_MARKER: 74 continue 75 if not hasattr(obj, key): 76 continue 77 try: 78 evalvalue = eval(value) 79 if isinstance(evalvalue, list): 80 value = evalvalue 81 except: 82 pass 83 setattr(obj, key, value) 84 log_value = getattr(value, 'code', value) 85 changed.append('%s=%s' % (key, log_value)) 86 70 items_changed = super(HostelProcessor, self).updateEntry( 71 obj, row, site, filename) 87 72 # Log actions... 88 73 location_field = self.location_fields[0] 89 items_changed = ', '.join(changed)90 74 grok.getSite()['hostels'].logger.info( 91 75 '%s - %s - %s - updated: %s'
Note: See TracChangeset for help on using the changeset viewer.