diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2017-06-03 09:23:04 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-03 09:23:04 -0600 |
commit | e5e2cf89d01d7b09631977482b11df79e8131c6d (patch) | |
tree | a530210ff9fa4f44e1e3061af05df3f55ec96c35 /numpy/polynomial/_polybase.py | |
parent | 0e4610e30aabaf32c037fc94c869a20f2435a8f1 (diff) | |
parent | 1608e53072b035bd40de7a202e75354f0e802120 (diff) | |
download | numpy-e5e2cf89d01d7b09631977482b11df79e8131c6d.tar.gz |
Merge pull request #9215 from eric-wieser/bare-except
BUG: Avoid bare except clauses
Diffstat (limited to 'numpy/polynomial/_polybase.py')
-rw-r--r-- | numpy/polynomial/_polybase.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/numpy/polynomial/_polybase.py b/numpy/polynomial/_polybase.py index 39f5fac31..7fde63206 100644 --- a/numpy/polynomial/_polybase.py +++ b/numpy/polynomial/_polybase.py @@ -312,7 +312,7 @@ class ABCPolyBase(object): coef = self._add(self.coef, othercoef) except TypeError as e: raise e - except: + except Exception: return NotImplemented return self.__class__(coef, self.domain, self.window) @@ -322,7 +322,7 @@ class ABCPolyBase(object): coef = self._sub(self.coef, othercoef) except TypeError as e: raise e - except: + except Exception: return NotImplemented return self.__class__(coef, self.domain, self.window) @@ -332,7 +332,7 @@ class ABCPolyBase(object): coef = self._mul(self.coef, othercoef) except TypeError as e: raise e - except: + except Exception: return NotImplemented return self.__class__(coef, self.domain, self.window) @@ -367,7 +367,7 @@ class ABCPolyBase(object): quo, rem = self._div(self.coef, othercoef) except (TypeError, ZeroDivisionError) as e: raise e - except: + except Exception: return NotImplemented quo = self.__class__(quo, self.domain, self.window) rem = self.__class__(rem, self.domain, self.window) @@ -381,21 +381,21 @@ class ABCPolyBase(object): def __radd__(self, other): try: coef = self._add(other, self.coef) - except: + except Exception: return NotImplemented return self.__class__(coef, self.domain, self.window) def __rsub__(self, other): try: coef = self._sub(other, self.coef) - except: + except Exception: return NotImplemented return self.__class__(coef, self.domain, self.window) def __rmul__(self, other): try: coef = self._mul(other, self.coef) - except: + except Exception: return NotImplemented return self.__class__(coef, self.domain, self.window) @@ -425,7 +425,7 @@ class ABCPolyBase(object): quo, rem = self._div(other, self.coef) except ZeroDivisionError as e: raise e - except: + except Exception: return NotImplemented quo = self.__class__(quo, self.domain, self.window) rem = self.__class__(rem, self.domain, self.window) |