Skip to content

Commit

Permalink
snort: use raw string for version regex
Browse files Browse the repository at this point in the history
Cleans up deprecation notice for invalid escape sequence.
  • Loading branch information
jasonish committed Apr 20, 2023
1 parent 843611b commit 7c567d3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion idstools/snort.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def version(self):
stdout, stderr = subprocess.Popen(
[self.path, "-V"], stdout=subprocess.PIPE,
stderr=subprocess.PIPE).communicate()
m = re.search("(Version (\d+\.\d+\.\d+(\.\d+)?).*)$", stderr.decode("utf-8"), re.M)
m = re.search(r"(Version (\d+\.\d+\.\d+(\.\d+)?).*)$", stderr.decode("utf-8"), re.M)
version = m.group(2).strip()
version_string = m.group(1).strip()
parts = len(version.split("."))
Expand Down

0 comments on commit 7c567d3

Please sign in to comment.