Skip to content

Commit

Permalink
Changed try: except: to if statement
Browse files Browse the repository at this point in the history
  • Loading branch information
akimbler committed Jun 26, 2019
1 parent bd84909 commit 365d2b0
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions cis_proc.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 365d2b0

Please sign in to comment.