aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/mesonlib.py
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2017-01-17 13:30:54 +0530
committerNirbheek Chauhan <nirbheek@centricular.com>2017-01-17 15:39:01 +0530
commite441a7428240995cc85c695189f01e757f01f610 (patch)
tree6faad9ca1902ae031408e6c27b207ade44a18a03 /mesonbuild/mesonlib.py
parent11f9425a5e123e7e4bb6296f4453a8e072eb95ed (diff)
downloadmeson-e441a7428240995cc85c695189f01e757f01f610.zip
meson-e441a7428240995cc85c695189f01e757f01f610.tar.gz
meson-e441a7428240995cc85c695189f01e757f01f610.tar.bz2
Derive all exceptions correctly from base exceptions
Don't need to define __init__ and manually call the parent init. Doing so messes up the error message you get by doing str(exception) because it includes the current class name in it repeatedly.
Diffstat (limited to 'mesonbuild/mesonlib.py')
-rw-r--r--mesonbuild/mesonlib.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/mesonbuild/mesonlib.py b/mesonbuild/mesonlib.py
index c4f6769..685efc5 100644
--- a/mesonbuild/mesonlib.py
+++ b/mesonbuild/mesonlib.py
@@ -19,12 +19,10 @@ import platform, subprocess, operator, os, shutil, re
from glob import glob
class MesonException(Exception):
- def __init__(self, *args, **kwargs):
- Exception.__init__(self, *args, **kwargs)
+ '''Exceptions thrown by Meson'''
class EnvironmentException(MesonException):
- def __init__(self, *args, **kwargs):
- super().__init__(*args, **kwargs)
+ '''Exceptions thrown while processing and creating the build environment'''
class File:
def __init__(self, is_built, subdir, fname):