Simplify RE validation 89/45189/1
authorPeter Barabas <peter.barabas@ericsson.com>
Mon, 16 Oct 2017 08:28:31 +0000 (10:28 +0200)
committerPeter Barabas <peter.barabas@ericsson.com>
Mon, 16 Oct 2017 08:31:10 +0000 (10:31 +0200)
Change-Id: Icbafb709556cb644c42a35303f5cc76500f404ee
Signed-off-by: Peter Barabas <peter.barabas@ericsson.com>
3rd_party/collectd-ves-app/ves_app/normalizer.py

index 48a379c..ddaad61 100644 (file)
@@ -216,9 +216,7 @@ class CollectdData(object):
 
     @classmethod
     def is_regular_expression(cls, expr):
-        if len(expr) > 1 and expr[0] == '/' and expr[-1] == '/':
-            return True
-        return False
+        return len(expr) > 1 and expr[0] == '/' and expr[-1] == '/'
 
     def match(self, **kargs):
         # compare the metric