From: BenoƮt Fontaine Date: Mon, 8 Jan 2018 16:50:02 +0000 (+0100) Subject: -i option: the first fid will always have the identifier I1 + removal of test lines X-Git-Url: https://git.nutra.tk/v2?a=commitdiff_plain;h=ccfc8233c53a48262898bdf7db4de02b8b691411;p=gamesguru%2Fgetmyancestors.git -i option: the first fid will always have the identifier I1 + removal of test lines --- diff --git a/getmyancestors.py b/getmyancestors.py index bd5123f..5f01d61 100755 --- a/getmyancestors.py +++ b/getmyancestors.py @@ -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)