Skip to content
This repository has been archived by the owner on Jan 17, 2018. It is now read-only.

Commit

Permalink
Merge pull request #36 from BagelOrb/patch-1
Browse files Browse the repository at this point in the history
fix getValue regex
  • Loading branch information
BagelOrb authored Feb 27, 2017
2 parents 07b39f4 + ab11c07 commit faa639f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Script.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def getValue(self, line, key, default = None):
if not key in line or (';' in line and line.find(key) > line.find(';')):
return default
sub_part = line[line.find(key) + 1:]
m = re.search('^[0-9]+\.?[0-9]*', sub_part)
m = re.search('^-?[0-9]+\.?[0-9]*', sub_part)
if m is None:
return default
try:
Expand All @@ -98,4 +98,4 @@ def getValue(self, line, key, default = None):
## This is called when the script is executed.
# It gets a list of g-code strings and needs to return a (modified) list.
def execute(self, data):
raise NotImplementedError()
raise NotImplementedError()

0 comments on commit faa639f

Please sign in to comment.