Example #1
0
File: File.py Project: poses/erp5
 def _setFile(self, data, precondition=None):
     if data is not None and self.hasData() and \
       str(data.read()) == str(self.getData()):
         # Same data as previous, no need to change it's content
         return
     CMFFile._edit(self, precondition=precondition, file=data)
Example #2
0
File: File.py Project: smetsjp/erp5
 def _setFile(self, data, precondition=None):
   if data is not None and self.hasData() and \
     str(data.read()) == str(self.getData()):
     # Same data as previous, no need to change it's content
     return
   CMFFile._edit(self, precondition=precondition, file=data)