From: BenoƮt Fontaine Date: Wed, 31 Jan 2018 17:52:36 +0000 (+0100) Subject: Fix bug from last commit (when there isn't -i option) X-Git-Url: https://git.nutra.tk/v1?a=commitdiff_plain;h=4775c56f0be0fff79517f2376f5c29faf2f5efa4;p=gamesguru%2Fgetmyancestors.git Fix bug from last commit (when there isn't -i option) --- diff --git a/README.md b/README.md index 4e62dd4..6c551fa 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ This script requires python 3.4 (or higher) to run due to some novel features in To download the script, click on the green button "Clone or download" on the top of this page and then click on "Download ZIP". -Current version was updated on January 20th 2018. +Current version was updated on January 31th 2018. Examples ======== diff --git a/getmyancestors.py b/getmyancestors.py index 47b3e96..5ab2e65 100755 --- a/getmyancestors.py +++ b/getmyancestors.py @@ -931,10 +931,10 @@ if __name__ == '__main__': parser.print_help() exit(2) - for fid in args.i: - if not re.match(r'[A-Z0-9]{4}-[A-Z0-9]{3}', fid): - print('Invalid FamilySearch ID: ' + fid) - exit(2) + if args.i: + for fid in args.i: + if not re.match(r'[A-Z0-9]{4}-[A-Z0-9]{3}', fid): + exit('Invalid FamilySearch ID: ' + fid) username = args.u if args.u else input("Enter FamilySearch username: ") password = args.p if args.p else getpass.getpass("Enter FamilySearch password: ")