python snippet du jour

Martin Pool mbp at
Wed Dec 16 07:54:33 GMT 2009

I hope this amuses you as much as it did me:

         """Return the .bzrdir style format present in a directory."""
             format_string = transport.get_bytes(".bzr/branch-format")
-        except errors.NoSuchFile:
+        except errors.NoSuchFile, errors.TransportNotPossible:
             raise errors.NotBranchError(path=transport.base)


Martin <>

More information about the bazaar mailing list