~abentley/bzr/appenddir

« back to all changes in this revision

Viewing changes to bzrlib/config.py

  • Committer: Aaron Bentley
  • Date: 2011-02-17 16:36:34 UTC
  • Revision ID: aaron@aaronbentley.com-20110217163634-8dbdizywbm9wlvbs
Saner checking for valid store locations.

Show diffs side-by-side

added added

removed removed

Lines of Context:
931
931
    @needs_write_lock
932
932
    def set_user_option(self, option, value, store=STORE_LOCATION):
933
933
        """Save option and its value in the configuration."""
934
 
        if store not in _policy_name:
 
934
        if store not in [STORE_LOCATION,
 
935
                         STORE_LOCATION_NORECURSE,
 
936
                         STORE_LOCATION_APPENDPATH,
 
937
                         STORE_LOCATION_APPENDDIR]:
935
938
            raise ValueError('bad storage policy %r for %r' %
936
939
                (store, option))
937
940
        self.reload()