From 471523167e0055b7ff76da981073bea4ffc3f228 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Thu, 12 Apr 2018 23:19:34 +0200 Subject: [PATCH] tools: fix error reporing on unknown storage pool --- qubesadmin/tools/__init__.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/qubesadmin/tools/__init__.py b/qubesadmin/tools/__init__.py index 43a24fe..1f387d2 100644 --- a/qubesadmin/tools/__init__.py +++ b/qubesadmin/tools/__init__.py @@ -314,6 +314,9 @@ class PoolsAction(QubesAction): except qubesadmin.exc.QubesException as e: parser.error(str(e)) sys.exit(2) + except KeyError: + parser.error('No such pools: %s' % pool_names) + sys.exit(2) class QubesArgumentParser(argparse.ArgumentParser):