]> Nutra Git (v2) - gamesguru/getmyancestors.git/commitdiff
Fix bug from last commit (when there isn't -i option)
authorBenoît Fontaine <benoitfontaine.ba@gmail.com>
Wed, 31 Jan 2018 17:52:36 +0000 (18:52 +0100)
committerBenoît Fontaine <benoitfontaine.ba@gmail.com>
Wed, 31 Jan 2018 17:52:36 +0000 (18:52 +0100)
README.md
getmyancestors.py

index 4e62dd4727ea1a65d33703f0b3151d33ccbde53d..6c551fa6c3183f4f796439e7216fbfd008659c2b 100644 (file)
--- 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
 ========
index 47b3e96f27cba858c3735a0b7ccc4f1c7489f7d1..5ab2e6538027b1228304af3534d8d743eaf9f171 100755 (executable)
@@ -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: ")