/breezy/unstable

To get this branch, use:
bzr branch https://code.breezy-vcs.org/breezy/unstable

« back to all changes in this revision

Viewing changes to breezy/registry.py

  • Committer: Jelmer Vernooij
  • Date: 2017-05-24 01:39:33 UTC
  • mfrom: (3815.3776.6)
  • Revision ID: jelmer@jelmer.uk-20170524013933-ir4y4tqtrsiz2ka2
New upstream snapshot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 
19
19
from __future__ import absolute_import
20
20
 
21
 
from bzrlib.pyutils import get_named_object
 
21
from .pyutils import get_named_object
22
22
 
23
23
 
24
24
class _ObjectGetter(object):
240
240
                       for key, getter in self._dict.items()])
241
241
 
242
242
    def _set_default_key(self, key):
243
 
        if not self._dict.has_key(key):
 
243
        if key not in self._dict:
244
244
            raise KeyError('No object registered under key %s.' % key)
245
245
        else:
246
246
            self._default_key = key