eRPC: Backward compatibility with runtime versions missing GetVersions extended call.
authorEdouard Tisserant <edouard@beremiz.fr>
Mon, 11 Nov 2024 15:22:44 +0100
changeset 4036 102555078a0c
parent 4035 c317fc64035e
child 4043 b217fb367574
eRPC: Backward compatibility with runtime versions missing GetVersions extended call.
ProjectController.py
--- a/ProjectController.py	Fri Nov 08 11:34:46 2024 +0100
+++ b/ProjectController.py	Mon Nov 11 15:22:44 2024 +0100
@@ -1920,8 +1920,9 @@
             self.logger.write_error(_("Connection failed to %s!\n") % uri)
         else:
             VersionsInfoBytes = self._connector.ExtendedCall("GetVersions", bytes())
-            VersionsInfo = VersionsInfoBytes.decode()
-            self.logger.write(f"Version string: {VersionsInfo}\n")
+            if VersionsInfoBytes is not None:
+                VersionsInfo = VersionsInfoBytes.decode()
+                self.logger.write(f"Version string: {VersionsInfo}\n")
             self.CompareLocalAndRemotePLC()
 
             # Init with actual PLC status and print it