cleanup: Unused local variables

pull/1315/head
Mike Sinkovsky 8 years ago committed by Jussi Pakkanen
parent 22eed4c417
commit 1d177fb127
  1. 2
      mesonbuild/backend/vs2010backend.py
  2. 1
      mesonbuild/dependencies.py
  3. 1
      mesonbuild/environment.py
  4. 13
      mesonbuild/interpreter.py

@ -224,7 +224,7 @@ class Vs2010Backend(backends.Backend):
ofile.write('Microsoft Visual Studio Solution File, Format ' ofile.write('Microsoft Visual Studio Solution File, Format '
'Version 11.00\n') 'Version 11.00\n')
ofile.write('# Visual Studio ' + self.vs_version + '\n') ofile.write('# Visual Studio ' + self.vs_version + '\n')
prj_templ = prj_line = 'Project("{%s}") = "%s", "%s", "{%s}"\n' prj_templ = 'Project("{%s}") = "%s", "%s", "{%s}"\n'
for p in projlist: for p in projlist:
prj_line = prj_templ % (self.environment.coredata.guid, prj_line = prj_templ % (self.environment.coredata.guid,
p[0], p[1], p[2]) p[0], p[1], p[2])

@ -668,7 +668,6 @@ class BoostDependency(Dependency):
self.lib_modules_mt[modname] = fname self.lib_modules_mt[modname] = fname
def detect_lib_modules_nix(self): def detect_lib_modules_nix(self):
libsuffix = None
if mesonlib.is_osx(): if mesonlib.is_osx():
libsuffix = 'dylib' libsuffix = 'dylib'
else: else:

@ -635,7 +635,6 @@ class Environment():
raise EnvironmentException('Unknown compiler "' + ' '.join(exelist) + '"') raise EnvironmentException('Unknown compiler "' + ' '.join(exelist) + '"')
def detect_d_compiler(self, want_cross): def detect_d_compiler(self, want_cross):
exelist = None
is_cross = False is_cross = False
# Search for a D compiler. # Search for a D compiler.
# We prefer LDC over GDC unless overridden with the DC # We prefer LDC over GDC unless overridden with the DC

@ -1338,7 +1338,7 @@ class Interpreter(InterpreterBase):
projname, depname = di projname, depname = di
subproj = self.do_subproject(projname, {}) subproj = self.do_subproject(projname, {})
self.build.cross_stdlibs[l] = subproj.get_variable_method([depname], {}) self.build.cross_stdlibs[l] = subproj.get_variable_method([depname], {})
except KeyError as e: except KeyError:
pass pass
@stringArgs @stringArgs
@ -1565,16 +1565,13 @@ class Interpreter(InterpreterBase):
for defopt in self.default_project_options: for defopt in self.default_project_options:
key, value = defopt.split('=') key, value = defopt.split('=')
pref = key + '=' pref = key + '='
was_found = False
for i in default_options: for i in default_options:
if i.startswith(pref): if i.startswith(pref):
was_found = True
break break
if was_found: else:
break defopt = self.subproject + ':' + defopt
defopt = self.subproject + ':' + defopt newoptions = [defopt] + self.environment.cmd_line_options.projectoptions
newoptions = [defopt] + self.environment.cmd_line_options.projectoptions self.environment.cmd_line_options.projectoptions = newoptions
self.environment.cmd_line_options.projectoptions = newoptions
@stringArgs @stringArgs
def func_project(self, node, args, kwargs): def func_project(self, node, args, kwargs):

Loading…
Cancel
Save