[geneagrapher] 168/226: Removed unnecessary try-except blocks.

Doug Torrance dtorrance-guest at moszumanska.debian.org
Sat Jul 11 17:11:02 UTC 2015


This is an automated email from the git hooks/post-receive script.

dtorrance-guest pushed a commit to branch master
in repository geneagrapher.

commit c2eb8108de490063801b6a6c3e5c9f29fae42792
Author: David Alber <alber.david at gmail.com>
Date:   Fri Nov 4 22:13:05 2011 -0700

    Removed unnecessary try-except blocks.
---
 geneagrapher/geneagrapher.py | 18 +++---------------
 1 file changed, 3 insertions(+), 15 deletions(-)

diff --git a/geneagrapher/geneagrapher.py b/geneagrapher/geneagrapher.py
index 94425ec..8a87a75 100644
--- a/geneagrapher/geneagrapher.py
+++ b/geneagrapher/geneagrapher.py
@@ -67,11 +67,7 @@ class Geneagrapher:
                 grabber = Grabber(id)
                 if self.verbose:
                     print "Grabbing record #{}".format(id)
-                try:
-                    [name, institution, year, advisors, descendants] = grabber.extract_node_information()
-                except ValueError:
-                    # The given id does not exist in the Math Genealogy Project's database.
-                    raise
+                [name, institution, year, advisors, descendants] = grabber.extract_node_information()
                 self.graph.add_node(name, institution, year, id, advisors, descendants, True)
                 if self.get_ancestors:
                     ancestor_grab_queue += advisors
@@ -87,11 +83,7 @@ class Geneagrapher:
                     grabber = Grabber(id)
                     if self.verbose:
                         print "Grabbing record #{}".format(id)
-                    try:
-                        [name, institution, year, advisors, descendants] = grabber.extract_node_information()
-                    except ValueError:
-                        # The given id does not exist in the Math Genealogy Project's database.
-                        raise
+                    [name, institution, year, advisors, descendants] = grabber.extract_node_information()
                     self.graph.add_node(name, institution, year, id, advisors, descendants)
                     ancestor_grab_queue += advisors
                         
@@ -104,11 +96,7 @@ class Geneagrapher:
                     grabber = Grabber(id)
                     if self.verbose:
                         print "Grabbing record #{}".format(id)
-                    try:
-                        [name, institution, year, advisors, descendants] = grabber.extract_node_information()
-                    except ValueError:
-                        # The given id does not exist in the Math Genealogy Project's database.
-                        raise
+                    [name, institution, year, advisors, descendants] = grabber.extract_node_information()
                     self.graph.add_node(name, institution, year, id, advisors, descendants)
                     descendant_grab_queue += descendants
                     

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/geneagrapher.git



More information about the debian-science-commits mailing list