code: def _check_status(self):
          
          logger.info('Checking repo status')
          status = self.log_call(
              ['git', 'status', '--porcelain'],
              callwith=subprocess.check_output,
              cwd=self.cwd,
          )
          if status:
              raise DirtyException(status)
docs: Check repo status and except if dirty.