From: Barış Metin Date: Tue, 11 May 2010 20:02:10 +0000 (+0000) Subject: match rpm pattern with regexp X-Git-Tag: Monitor-3.0-34~2 X-Git-Url: http://git.onelab.eu/?p=monitor.git;a=commitdiff_plain;h=734f4dbd2fc993b27b044bcd3bd8c25f86be40c3 match rpm pattern with regexp --- diff --git a/web/MonitorWeb/monitorweb/controllers.py b/web/MonitorWeb/monitorweb/controllers.py index 3d68fe6..149a397 100644 --- a/web/MonitorWeb/monitorweb/controllers.py +++ b/web/MonitorWeb/monitorweb/controllers.py @@ -350,7 +350,8 @@ class Root(controllers.RootController, MonitorXmlrpcServer): if 'rpmvalue' in data and 'rpms' in data: if agg['rpms']: rpm_list = agg['rpms'].split() - rpm_list = filter(lambda x: data['rpmvalue'] in x, rpm_list) + rpm_list = filter(lambda x: re.match(data['rpmvalue'], x, re.I), + rpm_list) agg['rpms'] = " ".join(rpm_list) query.append(agg)