~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/config.py

  • Committer: Patch Queue Manager
  • Date: 2012-01-03 12:04:03 UTC
  • mfrom: (6404.3.1 908050-protect-unquote)
  • Revision ID: pqm@pqm.ubuntu.com-20120103120403-05m286q87wkbygl6
(vila) Robustly unquote configuration values (Vincent Ladeuil)

Show diffs side-by-side

added added

removed removed

Lines of Context:
3138
3138
            self._config_obj.list_values = False
3139
3139
 
3140
3140
    def unquote(self, value):
3141
 
        if value:
3142
 
            # _unquote doesn't handle None nor empty strings
 
3141
        if value and isinstance(value, basestring):
 
3142
            # _unquote doesn't handle None nor empty strings nor anything that
 
3143
            # is not a string, really.
3143
3144
            value = self._config_obj._unquote(value)
3144
3145
        return value
3145
3146