From ae3c14909568ba7f128db66c706808386e71a1f3 Mon Sep 17 00:00:00 2001
From: Thomas Schneider <thomas@fsmpi.rwth-aachen.de>
Date: Wed, 12 Apr 2023 22:39:52 +0200
Subject: [PATCH] get-models: Handle version == "" same as None

---
 src/nctool/cli.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/nctool/cli.py b/src/nctool/cli.py
index 18b59e3..ad4d289 100644
--- a/src/nctool/cli.py
+++ b/src/nctool/cli.py
@@ -70,7 +70,7 @@ def get_models(host, port, username, destination):
             assert any(
                 [el.text == "NETCONF" for el in schema.findall(prefix + "location")]
             )
-            if version is not None:
+            if version is not None and version != "":
                 v = f"@{version}"
             else:
                 v = ""
-- 
GitLab