Skip to content

Commit

Permalink
fix check report path (#578)
Browse files Browse the repository at this point in the history
  • Loading branch information
wayyoungboy authored Nov 26, 2024
1 parent 11ff484 commit 7902192
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions core.py
Original file line number Diff line number Diff line change
Expand Up @@ -428,16 +428,15 @@ def check(self, opts):
observer_check_handler.handle()
observer_result = observer_check_handler.execute()
result_data['observer'] = observer_result
result_data['store_dir'] = os.path.expanduser("./check_report/")
if obproxy_check_handler is not None:
obproxy_report_path = os.path.expanduser(obproxy_check_handler.report.get_report_path())
if os.path.exists(obproxy_report_path):
result_data['store_dir'] = os.path.dirname(obproxy_report_path)
result_data['obproxy_report_path'] = os.path.abspath(obproxy_report_path)
self.stdio.print("Check obproxy finished. For more details, please run cmd '" + Fore.YELLOW + " cat {0} ".format(obproxy_check_handler.report.get_report_path()) + Style.RESET_ALL + "'")
if observer_check_handler is not None:
observer_report_path = os.path.expanduser(observer_check_handler.report.get_report_path())
if os.path.exists(observer_report_path):
result_data['store_dir'] = os.path.dirname(observer_report_path)
result_data['observer_report_path'] = os.path.abspath(observer_report_path)
self.stdio.print("Check observer finished. For more details, please run cmd'" + Fore.YELLOW + " cat {0} ".format(observer_check_handler.report.get_report_path()) + Style.RESET_ALL + "'")
return ObdiagResult(ObdiagResult.SUCCESS_CODE, data=result_data)

Expand Down

0 comments on commit 7902192

Please sign in to comment.