2021-01-08 13:41:50 +01:00
|
|
|
From 31fedcb3173f73fbffc3b053bc64c94a7b608118 Mon Sep 17 00:00:00 2001
|
2020-03-05 13:49:45 +01:00
|
|
|
From: Silvio Moioli <smoioli@suse.de>
|
|
|
|
Date: Mon, 2 Mar 2020 11:23:59 +0100
|
2021-01-08 13:41:50 +01:00
|
|
|
Subject: [PATCH] batch_async: avoid using fnmatch to match event
|
|
|
|
(#217)
|
2020-03-05 13:49:45 +01:00
|
|
|
|
|
|
|
---
|
|
|
|
salt/cli/batch_async.py | 2 +-
|
|
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
|
|
|
|
diff --git a/salt/cli/batch_async.py b/salt/cli/batch_async.py
|
2021-01-08 13:41:50 +01:00
|
|
|
index 8d2601e636..1e2ac5b0d3 100644
|
2020-03-05 13:49:45 +01:00
|
|
|
--- a/salt/cli/batch_async.py
|
|
|
|
+++ b/salt/cli/batch_async.py
|
2021-01-08 13:41:50 +01:00
|
|
|
@@ -109,7 +109,7 @@ class BatchAsync:
|
2020-03-05 13:49:45 +01:00
|
|
|
return
|
|
|
|
mtag, data = self.event.unpack(raw, self.event.serial)
|
|
|
|
for (pattern, op) in self.patterns:
|
|
|
|
- if fnmatch.fnmatch(mtag, pattern):
|
|
|
|
+ if mtag.startswith(pattern[:-1]):
|
2021-01-08 13:41:50 +01:00
|
|
|
minion = data["id"]
|
|
|
|
if op == "ping_return":
|
2020-03-05 13:49:45 +01:00
|
|
|
self.minions.add(minion)
|
|
|
|
--
|
2021-01-08 13:41:50 +01:00
|
|
|
2.29.2
|
2020-03-05 13:49:45 +01:00
|
|
|
|
|
|
|
|