From f0afed6177a8f298d7aadd465a0e4ba137d27f27 Mon Sep 17 00:00:00 2001 From: Brent Baccala Date: Mon, 15 Apr 2019 10:24:57 -0400 Subject: [PATCH] Trac #27670: throw correct error types in uninstall script --- build/sage_bootstrap/uninstall.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build/sage_bootstrap/uninstall.py b/build/sage_bootstrap/uninstall.py index 6ae13b41897..204fbd0c2bd 100644 --- a/build/sage_bootstrap/uninstall.py +++ b/build/sage_bootstrap/uninstall.py @@ -252,7 +252,7 @@ def dir_type(path): """ if path and not pth.isdir(path): - raise argparse.ArgumentError( + raise argparse.ArgumentTypeError( "'{0}' is not a directory".format(path)) return path @@ -267,7 +267,7 @@ def spkg_type(pkg): pkgbase = pth.join(PKGS, pkg) if not pth.isdir(pkgbase): - raise argparse.ArgumentError( + raise argparse.ArgumentTypeError( "'{0}' is not a known spkg".format(pkg)) return pkg