From 6f1c9ed8d9fa96c85afb9925820dfa939cb78642 Mon Sep 17 00:00:00 2001 From: make-ing Date: Fri, 4 Sep 2015 18:14:55 +0200 Subject: [PATCH] changed grbl version regex to be non-greedy --- src/octoprint/util/comm_acc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/octoprint/util/comm_acc.py b/src/octoprint/util/comm_acc.py index f4bef674..da23ce64 100644 --- a/src/octoprint/util/comm_acc.py +++ b/src/octoprint/util/comm_acc.py @@ -1003,7 +1003,7 @@ class MachineCom(object): eventManager().fire(Events.ERROR, {"error": self.getErrorString()}) if("Grbl" in line): - versionMatch = re.search("Grbl (?P.+)(_(?P[0-9a-f]{7})(?P-dirty)?)? \[.+\]", line) + versionMatch = re.search("Grbl (?P.+?)(_(?P[0-9a-f]{7})(?P-dirty)?)? \[.+\]", line) if(versionMatch): versionDict = versionMatch.groupdict() self._writeGrblVersionToFile(versionDict)