fix(ratchet): refuse a package directory that does not exist
napalm-hpe-aruba-procurve ships napalm_procurve; guessed from its name, the ratchet measured nothing and wrote an empty baseline without a word.
This commit is contained in:
1 parent
6f1789f14a
commit
eb3a296aff
5 files changed
+33
-1
No files matched your search
@@ -40,7 +40,11 @@ def _check(args: argparse.Namespace) -> int:
|
||||
|
||||
|
||||
def _ratchet(args: argparse.Namespace) -> int:
|
||||
code, text = ratchet.run(args.path, _repo(args.path).package, write=args.write)
|
||||
try:
|
||||
code, text = ratchet.run(args.path, _repo(args.path).package, write=args.write)
|
||||
except FileNotFoundError as exc:
|
||||
print(exc, file=sys.stderr)
|
||||
return 2
|
||||
print(text)
|
||||
return code
|
||||
|
||||
|
||||
Reference in new issue
Block a user