Changeset 1237 in products
- Timestamp:
- Aug 11, 2009 1:17:09 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
quintagroup.transmogrifier/branches/plone-2.1/quintagroup.transmogrifier/quintagroup/transmogrifier/configview.py
r690 r1237 24 24 expkey = ANNOKEY+'.export' 25 25 oldconfig = self.getConfig('export') 26 if export_config and export_config != oldconfig:26 if export_config and self._configChanged(oldconfig, export_config): 27 27 self.anno[expkey] = export_config 28 28 stat.append('updated export') … … 34 34 impkey = ANNOKEY+'.import' 35 35 oldconfig = self.getConfig('import') 36 if import_config and import_config != oldconfig:36 if import_config and self._configChanged(oldconfig, import_config): 37 37 self.anno[impkey] = import_config 38 38 stat.append('updated import') … … 55 55 return file(fname).read() 56 56 57 def _configChanged(self, old, new): 58 """ Compare configs with normalization of line endings. 59 """ 60 if old == new: 61 return False 62 if old == new.replace('\r\n', '\n'): 63 return False 64 if old.strip() == new.replace('\r\n', '\n'): 65 return False 66 return True 67 57 68 def isDefault(self, type_): 58 69 key = '%s.%s' % (ANNOKEY, type_)
Note: See TracChangeset
for help on using the changeset viewer.