[jhbuild] set the number of options in a constant
- From: Frederic Peters <fpeters src gnome org>
- To: svn-commits-list gnome org
- Subject: [jhbuild] set the number of options in a constant
- Date: Sun, 3 May 2009 03:12:46 -0400 (EDT)
commit d54144136b8f2f8fed49fa143f4b6e982bae7215
Author: Frederic Peters <fpeters 0d be>
Date: Sun May 3 08:56:30 2009 +0200
set the number of options in a constant
---
jhbuild/frontends/terminal.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/jhbuild/frontends/terminal.py b/jhbuild/frontends/terminal.py
index 048fa64..cacc6c0 100644
--- a/jhbuild/frontends/terminal.py
+++ b/jhbuild/frontends/terminal.py
@@ -273,7 +273,7 @@ class TerminalBuildScript(buildscript.BuildScript):
uprint(_(' [2] ignore error and continue to %s') % nextstate)
uprint(_(' [3] give up on module'))
uprint(_(' [4] start shell'))
- i = 5
+ nb_options = i = 5
for altstate in altstates:
uprint(_(' [%d] go to stage %s') % (i, altstate))
i = i + 1
@@ -297,7 +297,7 @@ class TerminalBuildScript(buildscript.BuildScript):
else:
try:
val = int(val)
- return altstates[val - 5]
+ return altstates[val - nb_options]
except:
uprint(_('invalid choice'))
assert False, 'not reached'
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]