mirror of https://gitlab.com/ita1024/waf.git
Code simplifications
This commit is contained in:
parent
8c32fade86
commit
fbdc9fd5a3
|
@ -244,7 +244,7 @@ def add_settings_enums(self, namespace, filename_list):
|
|||
raise Errors.WafError("Tried to add gsettings enums to %r more than once" % self.name)
|
||||
self.settings_enum_namespace = namespace
|
||||
|
||||
if type(filename_list) != 'list':
|
||||
if not isinstance(filename_list, list):
|
||||
filename_list = [filename_list]
|
||||
self.settings_enum_files = filename_list
|
||||
|
||||
|
|
|
@ -230,6 +230,7 @@ class XMLHandler(ContentHandler):
|
|||
Parses ``.qrc`` files
|
||||
"""
|
||||
def __init__(self):
|
||||
ContentHandler.__init__(self)
|
||||
self.buf = []
|
||||
self.files = []
|
||||
def startElement(self, name, attrs):
|
||||
|
@ -455,7 +456,6 @@ def configure(self):
|
|||
self.fatal('Could not build a simple Qt application')
|
||||
|
||||
# FreeBSD does not add /usr/local/lib and the pkg-config files do not provide it either :-/
|
||||
from waflib import Utils
|
||||
if Utils.unversioned_sys_platform() == 'freebsd':
|
||||
frag = '#include <QApplication>\nint main(int argc, char **argv) { QApplication app(argc, argv); return NULL != (void*) (&app);}\n'
|
||||
try:
|
||||
|
|
|
@ -28,7 +28,7 @@ else:
|
|||
try:
|
||||
TimeoutExpired = subprocess.TimeoutExpired
|
||||
except AttributeError:
|
||||
class TimeoutExpired(object):
|
||||
class TimeoutExpired(Exception):
|
||||
pass
|
||||
|
||||
from collections import deque, defaultdict
|
||||
|
|
|
@ -16,7 +16,7 @@ except ImportError:
|
|||
try:
|
||||
TimeoutExpired = subprocess.TimeoutExpired
|
||||
except AttributeError:
|
||||
class TimeoutExpired(object):
|
||||
class TimeoutExpired(Exception):
|
||||
pass
|
||||
|
||||
def run():
|
||||
|
|
Loading…
Reference in New Issue