[jhbuild] run: Simplify code using a single-item list
- From: Emanuele Aina <emaaa src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [jhbuild] run: Simplify code using a single-item list
- Date: Wed, 10 Jul 2013 16:01:05 +0000 (UTC)
commit 68e3dcded9d3b4af5c6a8ff28fe384e65680c911
Author: Emanuele Aina <emanuele aina collabora com>
Date: Wed Jul 10 16:52:41 2013 +0200
run: Simplify code using a single-item list
https://bugzilla.gnome.org/show_bug.cgi?id=703954
jhbuild/commands/base.py | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/jhbuild/commands/base.py b/jhbuild/commands/base.py
index 665093b..33f9720 100644
--- a/jhbuild/commands/base.py
+++ b/jhbuild/commands/base.py
@@ -378,15 +378,15 @@ class cmd_run(Command):
if module_name:
module_set = jhbuild.moduleset.load(config)
try:
- module_list = [module_set.get_module(module_name, ignore_case = True)]
+ module = module_set.get_module(module_name, ignore_case = True)
except KeyError, e:
raise FatalError(_("A module called '%s' could not be found.") % e)
- build = jhbuild.frontends.get_buildscript(config, module_list, module_set=module_set)
+ build = jhbuild.frontends.get_buildscript(config, [module], module_set=module_set)
if options.in_builddir:
- workingdir = module_list[0].get_builddir(build)
+ workingdir = module.get_builddir(build)
else:
- workingdir = module_list[0].get_srcdir(build)
+ workingdir = module.get_srcdir(build)
try:
build.execute(args, cwd=workingdir)
except CommandError, exc:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]