~laney/autopilot/legacy-psutil-children

« back to all changes in this revision

Viewing changes to autopilot/introspection/dbus.py

  • Committer: CI bot
  • Author(s): Thomi Richards, Max Brustkern
  • Date: 2014-04-08 00:29:44 UTC
  • mfrom: (459.6.5 logger-privatization)
  • Revision ID: ps-jenkins@lists.canonical.com-20140408002944-hkq216cwlrrbg3k7
Make logger objects within autopilot private. 

Show diffs side-by-side

added added

removed removed

Lines of Context:
44
44
 
45
45
 
46
46
_object_registry = {}
47
 
logger = logging.getLogger(__name__)
 
47
_logger = logging.getLogger(__name__)
48
48
 
49
49
 
50
50
class StateNotFoundError(RuntimeError):
182
182
            try:
183
183
                self.__state[key] = create_value_instance(value, self, key)
184
184
            except ValueError as e:
185
 
                logger.warning(
 
185
                _logger.warning(
186
186
                    "While constructing attribute '%s.%s': %s",
187
187
                    self.__class__.__name__,
188
188
                    key,
428
428
        if type_name == "*" and not kwargs:
429
429
            raise TypeError("You must specify either a type name or a filter.")
430
430
 
431
 
        logger.debug(
 
431
        _logger.debug(
432
432
            "Selecting objects of %s with attributes: %r",
433
433
            'any type' if type_name == '*' else 'type ' + type_name, kwargs)
434
434
 
505
505
        """
506
506
        instances = self.get_state_by_path("/")
507
507
        if len(instances) != 1:
508
 
            logger.error("Could not retrieve root object.")
 
508
            _logger.error("Could not retrieve root object.")
509
509
            return None
510
510
        return self.make_introspection_object(instances[0])
511
511
 
541
541
        with Timer("GetState %s" % piece):
542
542
            data = self._backend.introspection_iface.GetState(piece)
543
543
            if len(data) > 15:
544
 
                logger.warning(
 
544
                _logger.warning(
545
545
                    "Your query '%s' returned a lot of data (%d items). This "
546
546
                    "is likely to be slow. You may want to consider optimising"
547
547
                    " your query to return fewer items.",