Debian Bug report logs - #352791 (similar to last bug, r/o issue)
mbp at canonical.com
Thu May 18 09:33:11 BST 2006
On 18 May 2006, Bob Tanner <tanner at real-time.com> wrote:
> Full details for the bug and proposed patch below:
> Some history about why this is happening:
Thanks, fixed, though in a slightly different way:
> --- /tmp/builtins.py 2006-02-14 10:38:21.449525973 +0100
> +++ /usr/lib/python2.4/site-packages/bzrlib/builtins.py 2006-02-14 10:41:13.509702178 +0100
> @@ -1113,12 +1113,13 @@
> igns += '\n'
> igns += name_pattern + '\n'
> + f = None
> f = AtomicFile(ifn, 'wt')
> - f.close()
> + if f is not None: f.close()
> inv = tree.inventory
> if inv.path2id('.bzrignore'):
The basic problem is that the resource guarded by try/finally is allocated
inside the try block, when it should be taken immediately before.
More information about the bazaar