From 17689344024c40ff1bd476a50cf6c678e7356a45 Mon Sep 17 00:00:00 2001
From: Jean-Michel <jmichel@google.com>
Date: Fri, 13 Mar 2020 11:48:08 +0100
Subject: [PATCH] Check nrfutil version.

---
 deploy.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/deploy.py b/deploy.py
index 8b5ec81..dbad4c9 100755
--- a/deploy.py
+++ b/deploy.py
@@ -528,6 +528,10 @@ class OpenSKInstaller:
       assert_mandatory_binary("nrfutil")
       assert_python_library("intelhex")
       assert_python_library("nordicsemi.lister")
+      nrfutil_version = __import__("nordicsemi").version.NRFUTIL_VERSION
+      if not nrfutil_version.startswith("6."):
+        fatal(("You need to install nrfutil python3 package v6.0 or above. "
+               "Found: {}".format(nrfutil_version)))
       if not SUPPORTED_BOARDS[self.args.board].nordic_dfu:
         fatal("This board doesn't support flashing over DFU.")
 
-- 
GitLab