From bea7a47349fd11ac2a4878d5e4575f3fbd55e498 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Mon, 5 Jun 2017 13:52:24 +0800 Subject: [PATCH] coredevice: compare gateware and software versions on release numbers only. Closes #738 --- artiq/coredevice/comm_kernel.py | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/artiq/coredevice/comm_kernel.py b/artiq/coredevice/comm_kernel.py index ff92b72ce..45f217bdd 100644 --- a/artiq/coredevice/comm_kernel.py +++ b/artiq/coredevice/comm_kernel.py @@ -284,15 +284,9 @@ class CommKernel: .format(runtime_id)) gateware_version = self._read_string() - if gateware_version.endswith(".dirty"): - gateware_version_clean = gateware_version[:-6] - else: - gateware_version_clean = gateware_version - if software_version.endswith(".dirty"): - software_version_clean = software_version[:-6] - else: - software_version_clean = software_version - if gateware_version_clean != software_version_clean: + gateware_release = gateware_version.split("+")[0] + software_release = software_version.split("+")[0] + if gateware_release != software_release: logger.warning("Mismatch between gateware (%s) " "and software (%s) versions", gateware_version, software_version)