From 94e3e58674aa52510e735606de333dee1b6c3f9f Mon Sep 17 00:00:00 2001 From: Richard Carter Date: Thu, 2 May 2024 07:04:56 -0400 Subject: [PATCH] fix: Support parsing inline-table format of Poetry dependency spec --- tasks.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tasks.py b/tasks.py index 36286526b..986d4afe5 100644 --- a/tasks.py +++ b/tasks.py @@ -44,7 +44,10 @@ def is_truthy(arg): with open("pyproject.toml", "r", encoding="utf8") as pyproject: parsed_toml = toml.load(pyproject) -NAUTOBOT_VERSION = parsed_toml["tool"]["poetry"]["dependencies"]["nautobot"] +try: + NAUTOBOT_VERSION = parsed_toml["tool"]["poetry"]["dependencies"]["nautobot"]["version"] +except TypeError: + NAUTOBOT_VERSION = parsed_toml["tool"]["poetry"]["dependencies"]["nautobot"] def task(function=None, *args, **kwargs): # pylint: disable=keyword-arg-before-vararg