~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/config.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2008-05-09 17:52:37 UTC
  • mfrom: (3418.3.1 trunk)
  • Revision ID: pqm@pqm.ubuntu.com-20080509175237-wexvavsbk1x3qf38
(vila) Fix #217650 by catching auth declarations outside sections

Show diffs side-by-side

added added

removed removed

Lines of Context:
994
994
        """
995
995
        credentials = None
996
996
        for auth_def_name, auth_def in self._get_config().items():
 
997
            if type(auth_def) is not configobj.Section:
 
998
                raise ValueError("%s defined outside a section" % auth_def_name)
 
999
 
997
1000
            a_scheme, a_host, a_user, a_path = map(
998
1001
                auth_def.get, ['scheme', 'host', 'user', 'path'])
999
1002