:param params: :return:
(self, params)
| 25 | |
| 26 | class Formater(HandlerBase): |
| 27 | def run(self, params): |
| 28 | """ |
| 29 | |
| 30 | :param params: |
| 31 | :return: |
| 32 | """ |
| 33 | if not params: |
| 34 | return params |
| 35 | |
| 36 | Reporter(params).update_task_progress(InfoType.FormatTask) |
| 37 | if self.handle_type == NORMAL_FORMAT: |
| 38 | return self._normal_format(params) |
| 39 | elif self.handle_type == NO_FORMAT: |
| 40 | return params |
| 41 | elif self.handle_type == CCN_FORMAT: |
| 42 | return self._ccn_format(params) |
| 43 | raise TaskFormatError("format type is not exist: %s" % self.handle_type) |
| 44 | |
| 45 | def _normal_format(self, params): |
| 46 | """ |
nothing calls this directly
no test coverage detected