From cb4c64eec99694af89f5256c176f186032c2395f Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Mon, 3 Apr 2017 10:18:56 +0200 Subject: [PATCH] Remove null argument for QtValueError --- qutebrowser/utils/qtutils.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/qutebrowser/utils/qtutils.py b/qutebrowser/utils/qtutils.py index 5c98a24da..adf0b2737 100644 --- a/qutebrowser/utils/qtutils.py +++ b/qutebrowser/utils/qtutils.py @@ -406,15 +406,12 @@ class QtValueError(ValueError): """Exception which gets raised by ensure_valid.""" - def __init__(self, obj, null=False): + def __init__(self, obj): try: self.reason = obj.errorString() except AttributeError: self.reason = None - if null: - err = "{} is null".format(obj) - else: - err = "{} is not valid".format(obj) + err = "{} is not valid".format(obj) if self.reason: err += ": {}".format(self.reason) super().__init__(err)