Skip to content

Commit

Permalink
Added warning about missing config file
Browse files Browse the repository at this point in the history
Now mandatory
  • Loading branch information
set-soft committed Nov 21, 2023
1 parent 197a61d commit 0108e18
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions kicost/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,9 @@ def load_config(file=None):
log_api_options('Loaded API options', obsessive=True)
else:
debug_overview('No config file found ({})'.format(file))
warning(W_CONFIG, "You should create a configuration file named `{}` containing your credentials".format(file))
warning(W_CONFIG, "Please consult the docs: "
"https://hildogjr.github.io/KiCost/docs/_build/singlehtml/index.html#document-configuration")
# Make sure all APIs are in the options
for api in get_api_list():
if api not in api_options:
Expand Down
3 changes: 2 additions & 1 deletion kicost/kicost_gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
from .kicost import kicost, output_filename # kicost core functions.
from .distributors import init_distributor_dict, get_distributors_iter, get_distributor_info, get_dist_name_from_label, set_distributors_progress
from .edas import file_eda_match, get_registered_eda_names, get_eda_label, get_registered_eda_labels
from .log import CustomFormatter
from .log import CustomFormatter, MyLogger
py_2 = sys.version_info < (3, 0)
if sys.platform.startswith("win32"):
from .os_windows import reg_enum_keys, reg_get
Expand Down Expand Up @@ -1179,6 +1179,7 @@ def kicost_gui(force_en_us, files, configure_kicost_apis, command_line_api_optio
ProgressGUI.frame = frame
# Redirect the logging system to the GUI area
logger_stream = GUI_Stream(frame.m_textCtrl_messages)
MyLogger.warn_hash = {}
for handler in get_logger().handlers:
if py_2:
handler.stream = logger_stream
Expand Down

0 comments on commit 0108e18

Please sign in to comment.