~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Tarmac
  • Author(s): Vincent Ladeuil, Patch Queue Manager, Jelmer Vernooij
  • Date: 2017-01-17 16:20:41 UTC
  • mfrom: (6619.1.2 trunk)
  • Revision ID: tarmac-20170117162041-oo62uk1qsmgc9j31
Merge 2.7 into trunk including fixes for bugs #1622039, #1644003, #1579093 and #1645017. [r=vila]

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
# Comments, suggestions and bug reports welcome.
18
18
 
19
19
 
20
 
from __future__ import generators
 
20
from __future__ import absolute_import
21
21
 
22
22
import sys
23
23
import os
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
1797
1799
        if value.find('"""') == -1:
 
1800
            quot = tsquot
 
1801
        else:
1798
1802
            quot = tdquot
1799
 
        else:
1800
 
            quot = tsquot
1801
1803
        return quot
1802
1804
 
1803
1805