(self)
| 1041 | ] |
| 1042 | |
| 1043 | def generate_report(self) -> Dict: |
| 1044 | report = {"environments": [], "update_time": int(time.time())} |
| 1045 | for detector in self.detectors: |
| 1046 | try: |
| 1047 | envs = detector.detect() |
| 1048 | report["environments"].extend([e.to_dict() for e in envs]) |
| 1049 | except Exception as e: |
| 1050 | print("环境检测失败:{}".format(str(e))) |
| 1051 | traceback.print_exc() |
| 1052 | continue |
| 1053 | return report |
| 1054 | |
| 1055 | @classmethod |
| 1056 | def update_report(cls, *now_report: Dict) -> Optional[str]: |
no test coverage detected