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
1=== modified file 'config.py'
2--- config.py 2011-01-24 06:23:40 +0000
3+++ config.py 2011-02-03 10:28:01 +0000
4@@ -18,12 +18,12 @@
5 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
6 #
7
8-from bzrlib.config import ConfigObj, TreeConfig
9+from bzrlib.config import (
10+ configobj,
11+ ConfigObj,
12+ TreeConfig,
13+ )
14 from bzrlib.trace import mutter, warning
15-try:
16- from bzrlib.util.configobj.configobj import ParseError
17-except ImportError:
18- from configobj import ParseError
19
20
21 BUILD_TYPE_NORMAL = "normal"
22@@ -100,7 +100,7 @@
23 for input in files:
24 try:
25 config = ConfigObj(input[0])
26- except ParseError, e:
27+ except configobj.ParseError, e:
28 if len(input) > 2:
29 content = input[2]
30 else:

Subscribers

People subscribed via source and target branches