Skip to content

Commit

Permalink
Fixed error msg in status box when config var is not found
Browse files Browse the repository at this point in the history
  • Loading branch information
kanechen66 committed Nov 5, 2024
1 parent e6f697b commit d8aba79
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions SetupDataPkg/Tools/ConfigEditor.py
Original file line number Diff line number Diff line change
Expand Up @@ -992,11 +992,14 @@ def load_from_ml(self):

def load_variable_runtime(self):
status = uefi_var_read.read_all_uefi_vars("RuntimeVar.vl", self.config_xml_path)
info_msg = "Settings are read from system and save to RuntimeVar.vl"
if status == -1:
info_msg = f"No Config Var is found, all the data from from {self.config_xml_path}"
messagebox.showinfo("WARNING", f"No Config Var is found, all the data from from {self.config_xml_path}")
self.output_current_status(f"No Config Var is found, all the data from from {self.config_xml_path}")
self.load_bin_file("RuntimeVar.vl")
self.output_current_status("Settings are read from system and save to RuntimeVar.vl")
else:
self.load_bin_file("RuntimeVar.vl")

self.output_current_status(info_msg)

def get_save_file_name(self, extension):
file_ext = extension.split(' ')
Expand Down

0 comments on commit d8aba79

Please sign in to comment.