~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-08 07:05:00 UTC
  • mfrom: (3376.2.15 no-asserts)
  • Revision ID: pqm@pqm.ubuntu.com-20080508070500-9zyyvsk0eev20t4w
(mbp) remove and disallow assert statements

Show diffs side-by-side

added added

removed removed

Lines of Context:
570
570
 
571
571
    def set_user_option(self, option, value, store=STORE_LOCATION):
572
572
        """Save option and its value in the configuration."""
573
 
        assert store in [STORE_LOCATION,
 
573
        if store not in [STORE_LOCATION,
574
574
                         STORE_LOCATION_NORECURSE,
575
 
                         STORE_LOCATION_APPENDPATH], 'bad storage policy'
 
575
                         STORE_LOCATION_APPENDPATH]:
 
576
            raise ValueError('bad storage policy %r for %r' %
 
577
                (store, option))
576
578
        # FIXME: RBC 20051029 This should refresh the parser and also take a
577
579
        # file lock on locations.conf.
578
580
        conf_dir = os.path.dirname(self._get_filename())