From cce7c505e202faad1ad4f823f9255660f90144ff Mon Sep 17 00:00:00 2001 From: Chris PeBenito Date: Thu, 7 Jan 2016 13:27:33 -0500 Subject: [PATCH] sediff: fix except blocks to only catch the expected exception. Fix copy-paste bugs exposed by this. --- sediff | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/sediff b/sediff index e30d8f2..63d658f 100755 --- a/sediff +++ b/sediff @@ -250,7 +250,7 @@ try: try: rule_string += " [ {0} ]".format(rule.conditional) - except: + except AttributeError: pass print(" * {0}".format(rule_string)) @@ -286,7 +286,7 @@ try: try: rule_string += " [ {0} ]".format(rule.conditional) - except: + except AttributeError: pass print(" * {0}".format(rule_string)) @@ -322,7 +322,7 @@ try: try: rule_string += " [ {0} ]".format(rule.conditional) - except: + except AttributeError: pass print(" * {0}".format(rule_string)) @@ -358,7 +358,7 @@ try: try: rule_string += " [ {0} ]".format(rule.conditional) - except: + except AttributeError: pass print(" * {0}".format(rule_string)) @@ -392,15 +392,15 @@ try: rule, added_default, removed_default) try: - rule_string += " {0}".format(self.filename) - except: + rule_string += " {0}".format(rule.filename) + except AttributeError: pass rule_string += ";" try: rule_string += " [ {0} ]".format(rule.conditional) - except: + except AttributeError: pass print(" * {0}".format(rule_string)) @@ -432,15 +432,15 @@ try: rule, added_default, removed_default) try: - rule_string += " {0}".format(self.filename) - except: + rule_string += " {0}".format(rule.filename) + except AttributeError: pass rule_string += ";" try: rule_string += " [ {0} ]".format(rule.conditional) - except: + except AttributeError: pass print(" * {0}".format(rule_string)) @@ -472,15 +472,15 @@ try: rule, added_default, removed_default) try: - rule_string += " {0}".format(self.filename) - except: + rule_string += " {0}".format(rule.filename) + except AttributeError: pass rule_string += ";" try: rule_string += " [ {0} ]".format(rule.conditional) - except: + except AttributeError: pass print(" * {0}".format(rule_string))