Commit e76e2347 authored by Jelmer Vernooij's avatar Jelmer Vernooij

Don't traceback when no .git directory is found.

parent 2cf25e4e
......@@ -4,6 +4,7 @@ lintian-brush (0.9) UNRELEASED; urgency=medium
* Add fixer for unnecessary-team-upload.
* Don't attempt to remove python*-*-dbg packages; they include _d.so
files that are not in -dbgsym packages.
* Don't traceback when no .git directory is found.
-- Jelmer Vernooij <jelmer@debian.org> Fri, 23 Nov 2018 13:59:02 +0000
......
......@@ -26,7 +26,10 @@ locale.setlocale(locale.LC_ALL, '')
sys._brz_default_fs_enc = "utf8"
import breezy # noqa: E402
from breezy.errors import DependencyNotPresent # noqa: E402
from breezy.errors import (
DependencyNotPresent, # noqa: E402
NotBranchError,
)
breezy.initialize()
import breezy.git # noqa: E402
import breezy.bzr # noqa: E402
......@@ -87,6 +90,9 @@ def main(argv=None):
else:
try:
wt = WorkingTree.open(args.directory)
except NotBranchError:
note('No version control directory found (e.g. a .git directory).')
return 1
except DependencyNotPresent as e:
note('Unable to open tree at %s: missing package %s',
args.directory, e.library)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment