diff --git a/src/DIRAC/ResourceStatusSystem/scripts/dirac_rss_query_dtcache.py b/src/DIRAC/ResourceStatusSystem/scripts/dirac_rss_query_dtcache.py index a616153df08..0df80307717 100755 --- a/src/DIRAC/ResourceStatusSystem/scripts/dirac_rss_query_dtcache.py +++ b/src/DIRAC/ResourceStatusSystem/scripts/dirac_rss_query_dtcache.py @@ -43,10 +43,12 @@ def parseSwitches(): args = Script.getPositionalArgs() if not args: error("Missing mandatory 'query' argument") + DIRACExit(1) elif not args[0].lower() in ("select", "add", "delete"): error("Missing mandatory argument") - else: - query = args[0].lower() + DIRACExit(1) + + query = args[0].lower() switches = dict(Script.getUnprocessedSwitches())