Skip to content
Snippets Groups Projects
Verified Commit 10c5aabb authored by Štěpán Henek's avatar Štěpán Henek :bear:
Browse files

foris-controller: multiline fix

parent a7a767d6
Branches
Tags
No related merge requests found
......@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=foris-controller
PKG_VERSION:=0.7.3
PKG_RELEASE:=1
PKG_RELEASE:=2
PKG_SOURCE_SUBDIR:=$(PKG_NAME)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://gitlab.labs.nic.cz/turris/foris-controller
......
diff --git a/foris_controller_backends/cmdline/__init__.py b/foris_controller_backends/cmdline/__init__.py
index 96a41b6..624e65e 100644
--- a/foris_controller_backends/cmdline/__init__.py
+++ b/foris_controller_backends/cmdline/__init__.py
@@ -101,7 +101,7 @@ class BaseCmdLine(object):
if not retval == 0:
logger.error("Command %s failed." % str(args))
raise BackendCommandFailed(retval, args)
- match = re.search(regex, stdout)
+ match = re.search(regex, stdout, re.MULTILINE)
if not match:
logger.error("Failed to parse output of %s." % str(args))
raise FailedToParseCommandOutput(args, stdout)
diff --git a/foris_controller_backends/files/__init__.py b/foris_controller_backends/files/__init__.py
index de3e857..d985d71 100644
--- a/foris_controller_backends/files/__init__.py
+++ b/foris_controller_backends/files/__init__.py
@@ -61,7 +61,7 @@ class BaseFile(object):
:rtype: tuple
"""
content = self._file_content(path)
- match = re.search(regex, content)
+ match = re.search(regex, content, re.MULTILINE)
if not match:
logger.error("Failed to parse content of '%s'." % path)
raise FailedToParseFileContent(path, content)
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment