~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/registry.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2008-12-09 02:34:52 UTC
  • mfrom: (3882.1.2 277048-transport-registry)
  • Revision ID: pqm@pqm.ubuntu.com-20081209023452-12dbzcwzxrt1xee3
(mbp) Don't call iteritems on transport_list_registry, because it may change during iteration

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2006 Canonical Ltd
 
1
# Copyright (C) 2006, 2008 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
216
216
        for key, getter in self._dict.iteritems():
217
217
            yield key, getter.get_obj()
218
218
 
 
219
    def items(self):
 
220
        return sorted(self.iteritems())
 
221
 
219
222
    def _set_default_key(self, key):
220
223
        if not self._dict.has_key(key):
221
224
            raise KeyError('No object registered under key %s.' % key)