From 9d21b16e2198ef4fd7e9c48f9f31fdfb7045b6f6 Mon Sep 17 00:00:00 2001 From: Stephen Kiely Date: Tue, 17 Dec 2024 10:34:53 -0600 Subject: [PATCH] U/smk4664 invoke updates (#193) * Support docker tags in `invoke unittest` * Add Change Fragment * Update ValueError to use _get_docker_nautobot_version --- changes/190.housekeeping | 1 + tasks.py | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 changes/190.housekeeping diff --git a/changes/190.housekeeping b/changes/190.housekeeping new file mode 100644 index 0000000..2833d46 --- /dev/null +++ b/changes/190.housekeeping @@ -0,0 +1 @@ +Update the version parsing function to retrieve version using _get_docker_nautobot_version. diff --git a/tasks.py b/tasks.py index 2d7972d..fc5ff9d 100644 --- a/tasks.py +++ b/tasks.py @@ -69,9 +69,10 @@ def is_truthy(arg): def _get_test_dump_path(context): - parsed_nautobot_version = context.nautobot_netbox_importer.nautobot_ver.split(".") + version = _get_docker_nautobot_version(context) + parsed_nautobot_version = version.split(".") if len(parsed_nautobot_version) < 2: # noqa: PLR2004 - raise ValueError(f"Can't determine the Nautobot version from: {context.nautobot_netbox_importer.nautobot_ver}") + raise ValueError(f"Can't determine the Nautobot version from: {version}") return ( Path(__file__).parent