small bug in "bzr branch"

Martin Pool mbp at canonical.com
Tue Feb 13 12:16:27 GMT 2007


On 12 Feb 2007, John Arbash Meinel <john at arbash-meinel.com> wrote:
> I just saw this in cmd_branch:
> 
>         try:
>             br_from = Branch.open(from_location)
>         except OSError, e:
>             if e.errno == errno.ENOENT:
>                 raise errors.BzrCommandError('Source location "%s" does not'
>                                              ' exist.' % to_location)
>             else:
>                 raise
> 
> I'm pretty sure that should be:
> 
> % from_location)
> 
> 
> But actually it doesn't matter, because the try/except OSError is bogus.
> We actually raise NotBranchError as part of Branch.open, so really it
> should all just be removed.

+1 to just remove it; if it does turn out that an OSError is then
uncaught we can think about the best place to catch it.

In your mail before about checkout on an lp: url it looked like there
might be a similarly inverted message...

-- 
Martin



More information about the bazaar mailing list