This commit is contained in:
Hui Xiang
2015-01-13 21:22:03 +08:00
parent a56c147e01
commit 76d9b3f1c6
+3 -2
View File
@@ -156,9 +156,10 @@ class MonitorNeutronAgentsDaemon(Daemon):
def get_pattern(self, key, text):
if not key or not text:
raise Exception('Invalid key(%s) or text(%s)' % (key, text))
LOG.debug('Invalid key(%s) or text(%s)' % (key, text))
return None
pattern = re.compile(key)
pattern = re.compile('%s' % key)
result = pattern.findall(text)
return result