From 7b3d00fee4bc76e9b6492321572db7ddd6d7f674 Mon Sep 17 00:00:00 2001 From: Nirbheek Chauhan Date: Fri, 9 Dec 2016 12:47:14 +0530 Subject: Use dict for self.build.compilers instead of list Everywhere we use this object, we end up iterating over it and comparing compiler.get_language() with something. Using a dict is the obvious choice and simplifies a lot of code. --- mesonbuild/modules/rpm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mesonbuild/modules/rpm.py') diff --git a/mesonbuild/modules/rpm.py b/mesonbuild/modules/rpm.py index 2c9ed57..dca1ad6 100644 --- a/mesonbuild/modules/rpm.py +++ b/mesonbuild/modules/rpm.py @@ -27,7 +27,7 @@ class RPMModule: def generate_spec_template(self, state, args, kwargs): compiler_deps = set() - for compiler in state.compilers: + for compiler in state.compilers.values(): if isinstance(compiler, compilers.GnuCCompiler): compiler_deps.add('gcc') elif isinstance(compiler, compilers.GnuCPPCompiler): -- cgit v1.1