~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/util/configobj/configobj.py

  • Committer: Andrew Bennetts
  • Date: 2010-09-17 04:35:23 UTC
  • mfrom: (5050.17.20 2.2)
  • mto: This revision was merged to the branch mainline in revision 5431.
  • Revision ID: andrew.bennetts@canonical.com-20100917043523-c5t63gmvxqxmqh5j
Merge lp:bzr/2.2, including fixes for #625574, #636930, #254278.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1794
1794
    def _get_triple_quote(self, value):
1795
1795
        if (value.find('"""') != -1) and (value.find("'''") != -1):
1796
1796
            raise ConfigObjError('Value "%s" cannot be safely quoted.' % value)
1797
 
        # upstream version (up to version 4.7.2) has the bug with incorrect quoting;
1798
 
        # fixed in our copy based on the suggestion of ConfigObj's author
1799
1797
        if value.find('"""') == -1:
 
1798
            quot = tdquot
 
1799
        else:
1800
1800
            quot = tsquot
1801
 
        else:
1802
 
            quot = tdquot
1803
1801
        return quot
1804
1802
 
1805
1803