Skip to content

Commit 252dd18

Browse files
committed
Fix for MpConfigEdit ValueError
Updating version for hotfix
1 parent 5c4c7f6 commit 252dd18

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

msticpy/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
"""Version file."""
2-
VERSION = "1.8.0"
2+
VERSION = "1.8.1"

msticpy/config/mp_config_edit.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ def __init__(
7878
if not self.mp_conf_file.current_file and conf_filepath:
7979
self.mp_conf_file.current_file = conf_filepath
8080
elif isinstance(settings, str):
81-
self.mp_conf_file = MpConfigFile()
81+
self.mp_conf_file = MpConfigFile(file=settings)
8282
self.mp_conf_file.load_from_file(file=settings)
8383
else:
8484
self.mp_conf_file = MpConfigFile()

msticpy/config/mp_config_file.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
from datetime import datetime
1313
from pathlib import Path
1414
from typing import Any, Dict, Optional, Union
15-
import warnings
1615

1716
import ipywidgets as widgets
1817
import yaml
@@ -118,7 +117,7 @@ def __init__(
118117
self.mp_config_def_path is not None
119118
and not Path(self.mp_config_def_path).is_file()
120119
):
121-
warnings.warn(
120+
self.set_status(
122121
"MSTICPYCONFIG env variable is pointing to invalid path."
123122
+ self.mp_config_def_path
124123
)
@@ -137,7 +136,7 @@ def __init__(
137136
if self.current_file and Path(self.current_file).is_file():
138137
self.load_from_file(self.current_file)
139138
else:
140-
raise ValueError(f"File not found: '{self.current_file}'.")
139+
self.set_status(f"Filename does not exist: '{self.current_file}'.")
141140

142141
@property
143142
def current_file(self):

0 commit comments

Comments
 (0)