~free.ekanayaka/landscape-client/lucid-1.5.4-0ubuntu0.10.04.0

« back to all changes in this revision

Viewing changes to landscape/monitor/hardwareinventory.py

  • Committer: Bazaar Package Importer
  • Author(s): Free Ekanayaka
  • Date: 2010-06-28 18:07:18 UTC
  • mfrom: (1.2.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20100628180718-vytyqgbtkiirv5sb
Tags: 1.5.2.1-0ubuntu0.10.04.0
Filter duplicate network interfaces in get_active_interfaces (LP: #597000)

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
 
7
7
from landscape.diff import diff
8
8
from landscape.hal import HALManager
9
 
from landscape.monitor.monitor import MonitorPlugin
 
9
from landscape.monitor.plugin import MonitorPlugin
10
10
 
11
11
 
12
12
class HardwareInventory(MonitorPlugin):
82
82
 
83
83
        items_with_parents = {}
84
84
        deleted_devices = set()
85
 
        for udi,value in previous_devices.iteritems():
 
85
        for udi, value in previous_devices.iteritems():
86
86
            if udi not in current_devices:
87
 
                if value.has_key("info.parent"):
 
87
                if "info.parent" in value:
88
88
                    items_with_parents[udi] = value["info.parent"]
89
89
                deleted_devices.add(udi)
90
90