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):
74
74
def save_info (self , basedir = None ):
75
75
full_outputdir = fileutils .build_full_output_dir (
76
76
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 )
81
85
82
86
for key , info in self .read_runtime_info ().items ():
87
+ if not info :
88
+ continue
83
89
fileutils .write_file (os .path .join (
84
90
full_outputdir , "%s-%s.json" % (self .pd_host , key )), info )
You can’t perform that action at this time.
0 commit comments