From 365d2b0a8c549a6f29f995bc21dcb942718adadd Mon Sep 17 00:00:00 2001 From: Adam Kimbler Date: Wed, 26 Jun 2019 14:35:53 -0400 Subject: [PATCH] Changed try: except: to if statement --- cis_proc.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/cis_proc.py b/cis_proc.py index f8fe118..e4776a6 100755 --- a/cis_proc.py +++ b/cis_proc.py @@ -74,11 +74,10 @@ def main(argv=None): if not op.isfile(args.config): raise ValueError('Argument "config" must be an existing file.') - try: - n_procs = int(args.n_procs) - except: + if args.n_procs < 1: raise ValueError('Argument "n_procs" must be positive integer greater ' 'than zero.') + n_procs = args.n_procs with open(args.config, 'r') as fo: config_options = json.load(fo)