Created
April 17, 2019 19:44
-
-
Save StephenFordham/7db4b1e5e0dd595bb73c99162efe517b to your computer and use it in GitHub Desktop.
count_valid
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def count_valid(count_no): | |
num = int(count_no) | |
if num < 1: | |
raise argparse.ArgumentTypeError('The count has to be an integer above 0') | |
return num |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment