Remove null argument for QtValueError
This commit is contained in:
parent
2c3fcda18e
commit
cb4c64eec9
@ -406,15 +406,12 @@ class QtValueError(ValueError):
|
|||||||
|
|
||||||
"""Exception which gets raised by ensure_valid."""
|
"""Exception which gets raised by ensure_valid."""
|
||||||
|
|
||||||
def __init__(self, obj, null=False):
|
def __init__(self, obj):
|
||||||
try:
|
try:
|
||||||
self.reason = obj.errorString()
|
self.reason = obj.errorString()
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
self.reason = None
|
self.reason = None
|
||||||
if null:
|
err = "{} is not valid".format(obj)
|
||||||
err = "{} is null".format(obj)
|
|
||||||
else:
|
|
||||||
err = "{} is not valid".format(obj)
|
|
||||||
if self.reason:
|
if self.reason:
|
||||||
err += ": {}".format(self.reason)
|
err += ": {}".format(self.reason)
|
||||||
super().__init__(err)
|
super().__init__(err)
|
||||||
|
Loading…
Reference in New Issue
Block a user