File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed
Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -74,11 +74,17 @@ def build_url(uri):
7474 def save_info (self , basedir = None ):
7575 full_outputdir = fileutils .build_full_output_dir (
7676 basedir = basedir , subdir = self .pdctl_dir )
77- fileutils .write_file (os .path .join (
78- full_outputdir , "%s-health.json" % self .pd_host ), self .read_health ())
79- fileutils .write_file (os .path .join (
80- full_outputdir , "%s-diagnose.json" % self .pd_host ), self .read_diagnose ())
77+ pd_health = self .read_health ()
78+ if pd_health :
79+ fileutils .write_file (os .path .join (
80+ full_outputdir , "%s-health.json" % self .pd_host ), pd_health )
81+ pd_diagnose = self .read_diagnose ()
82+ if pd_diagnose :
83+ fileutils .write_file (os .path .join (
84+ full_outputdir , "%s-diagnose.json" % self .pd_host ), pd_diagnose )
8185
8286 for key , info in self .read_runtime_info ().items ():
87+ if not info :
88+ continue
8389 fileutils .write_file (os .path .join (
8490 full_outputdir , "%s-%s.json" % (self .pd_host , key )), info )
You can’t perform that action at this time.
0 commit comments