Beispiel #1
0
 def get_data(self):
     try:
         with open(self.path) as file:
             return self.parser.full_load(file)
     except FileNotFoundError:
         LOG.warning(
             'File {} not found, will be created upon persistence'.format(
                 self.path))
         return {}
Beispiel #2
0
 def _has_diff(self):
     if COMMIT not in self.checkpoint:
         LOG.warning('[{}] no checkpoint found, pipe will be executed')
         return True
     if self.expression is not None:
         LOG.info('[{}] detecting through expression evaluation: {}'.format(
             self.id, self.expression))
         return self._has_diff_expression()
     else:
         LOG.info('[{}] detecting any of the diffs'.format(self.id))
         return self._has_diff_all()