Merge lp:~jelmer/bzr-builddeb/712177-configobj into lp:bzr-builddeb

Proposed by Jelmer Vernooij
Status: Merged
Approved by: Vincent Ladeuil
Approved revision: 508
Merged at revision: 510
Proposed branch: lp:~jelmer/bzr-builddeb/712177-configobj
Merge into: lp:bzr-builddeb
Diff against target: 30 lines (+6/-6)
1 file modified
config.py (+6/-6)
To merge this branch: bzr merge lp:~jelmer/bzr-builddeb/712177-configobj
Reviewer Review Type Date Requested Status
Vincent Ladeuil Approve
Bzr-builddeb-hackers Pending
Review via email: mp+48442@code.launchpad.net

Description of the change

Fix import of ParseError when both bzr and the system have a (different) configobj copy.

To post a comment you must log in.
Revision history for this message
Vincent Ladeuil (vila) wrote :

Weird, where did you encounter the problem ?

review: Approve
Revision history for this message
Jelmer Vernooij (jelmer) wrote :

On Thu, 2011-02-03 at 15:17 +0000, Vincent Ladeuil wrote:
> Review: Approve
> Weird, where did you encounter the problem ?
This happens with the packaged version of bzr, which uses configobj
itself but in some situations also still has bzrlib.util.configobj
present.

Cheers,

Jelmer

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'config.py'
--- config.py 2011-01-24 06:23:40 +0000
+++ config.py 2011-02-03 10:28:01 +0000
@@ -18,12 +18,12 @@
18# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA18# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19#19#
2020
21from bzrlib.config import ConfigObj, TreeConfig21from bzrlib.config import (
22 configobj,
23 ConfigObj,
24 TreeConfig,
25 )
22from bzrlib.trace import mutter, warning26from bzrlib.trace import mutter, warning
23try:
24 from bzrlib.util.configobj.configobj import ParseError
25except ImportError:
26 from configobj import ParseError
2727
2828
29BUILD_TYPE_NORMAL = "normal"29BUILD_TYPE_NORMAL = "normal"
@@ -100,7 +100,7 @@
100 for input in files:100 for input in files:
101 try:101 try:
102 config = ConfigObj(input[0])102 config = ConfigObj(input[0])
103 except ParseError, e:103 except configobj.ParseError, e:
104 if len(input) > 2:104 if len(input) > 2:
105 content = input[2]105 content = input[2]
106 else:106 else:

Subscribers

People subscribed via source and target branches