Skip to content

Commit 084eca4

Browse files
committed
Remove redundant version.py, fix old config path mapping.
1 parent 9d33f8f commit 084eca4

2 files changed

Lines changed: 2 additions & 3 deletions

File tree

modbus4mqtt/modbus4mqtt.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -429,8 +429,8 @@ def _load_modbus_config(self, path: str) -> dict:
429429
try:
430430
result = yaml.load(open(path, "r").read())
431431
except FileNotFoundError:
432-
# Try to load the config from the pre-1.0.0 location. I.E. replace "config" with "modbus4mqtt"
433-
alt_path = path.replace("config", "modbus4mqtt")
432+
# Try to re-map the path from the old config path to the new one.
433+
alt_path = path.replace("/modbus4mqtt/modbus4mqtt", "/modbus4mqtt/config")
434434
logging.warning(
435435
"Failed to find config file on path: {}. Checking alternative path {}".format(
436436
path, alt_path

modbus4mqtt/version.py

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)