check agg['plc_node_stats']. this was causing the monitor deployment on PLE fail...
[monitor.git] / web / MonitorWeb / monitorweb / controllers.py
index 3d68fe6..6941327 100644 (file)
@@ -340,7 +340,8 @@ class Root(controllers.RootController, MonitorXmlrpcServer):
                                        agg = node.__dict__.copy()
                                else:
                                        agg = node.to_dict()
-                               agg.update(agg['plc_node_stats'])
+                                if agg['plc_node_stats']:
+                                        agg.update(agg['plc_node_stats'])
                                if agg['install_date']:
                                        agg['install_date'] = time.mktime(time.strptime(agg['install_date'], "%a %b %d %H:%M:%S %Y"))
                                if agg['kernel_version']:
@@ -350,7 +351,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)