]> Nutra Git (v2) - gamesguru/getmyancestors.git/commitdiff
-i option: the first fid will always have the identifier I1 + removal of test lines
authorBenoît Fontaine <benoitfontaine.ba@gmail.com>
Mon, 8 Jan 2018 16:50:02 +0000 (17:50 +0100)
committerBenoît Fontaine <benoitfontaine.ba@gmail.com>
Mon, 8 Jan 2018 16:50:02 +0000 (17:50 +0100)
getmyancestors.py

index bd5123f2f922b3931e895c0a2223daff1d6ac512..5f01d610065259a795ce94e1312178087d977353 100755 (executable)
@@ -87,7 +87,6 @@ class Session:
         self.timeout = timeout
         self.fid = self.lang = None
         self.login()
-        self.cg = 0
 
     # retrieve FamilySearch session ID (https://familysearch.org/developers/docs/guides/oauth2)
     def login(self):
@@ -211,7 +210,6 @@ class Session:
 
     # retrieve JSON structure from FamilySearch URL
     def get_url(self, url):
-        self.cg += 1
         while True:
             try:
                 if self.verbose:
@@ -925,7 +923,7 @@ if __name__ == '__main__':
     # initialize a FamilySearch session and a family tree object
     fs = Session(username, password, args.v, args.l, args.t)
     tree = Tree(fs)
-    start = time.time()
+
     # check LDS account
     if args.c:
         fs.get_url('https://familysearch.org/platform/tree/persons/%s/ordinances.json' % fs.get_userid())
@@ -933,7 +931,7 @@ if __name__ == '__main__':
     loop = asyncio.get_event_loop()
 
     # add list of starting individuals to the family tree
-    todo = set(args.i if args.i else [fs.get_userid()])
+    todo = args.i if args.i else [fs.get_userid()]
     for fid in todo:
         tree.add_indi(fid)
 
@@ -990,5 +988,3 @@ if __name__ == '__main__':
     # compute number for family relationships and print GEDCOM file
     tree.reset_num()
     tree.print(args.o)
-    print(time.time() - start)
-    print(fs.cg)