[Reportbug-maint] Bug#567501: Don't ask a question when there's only a single answer
Carl Chenet
chaica at ohmytux.com
Tue Mar 9 22:43:09 UTC 2010
Package: reportbug
Version: 4.10.2
Severity: normal
Tags: patch
Here is a patch to skip this question if there is only one ui available (which is always the text ui).
Bye,
Carl Chenet
-- Package-specific info:
** Environment settings:
DEBEMAIL="chaica at ohmytux.com"
DEBFULLNAME="Carl Chenet"
INTERFACE="text"
** /home/chaica/.reportbugrc:
reportbug_version "4.10.2"
mode novice
ui text
smtphost "smtp.free.fr"
-- System Information:
Debian Release: squeeze/sid
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.6.30-1-686 (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages reportbug depends on:
ii apt 0.7.23.1 Advanced front-end for dpkg
ii python 2.5.4-2 An interactive high-level object-o
ii python-reportbug 4.10.2 Python modules for interacting wit
reportbug recommends no packages.
Versions of packages reportbug suggests:
pn debconf-utils <none> (no description available)
ii debsums 2.0.47 tool for verification of installed
pn dlocate <none> (no description available)
pn emacs22-bin-common | emacs23- <none> (no description available)
ii exim4 4.69-11 metapackage to ease Exim MTA (v4)
ii exim4-daemon-light [mail-tran 4.69-11+b1 lightweight Exim MTA (v4) daemon
ii file 5.03-1 Determines file type using "magic"
ii gnupg 1.4.10-1 GNU privacy guard - a free PGP rep
pn python-gtk2 <none> (no description available)
pn python-gtkspell <none> (no description available)
pn python-urwid <none> (no description available)
pn python-vte <none> (no description available)
pn xdg-utils <none> (no description available)
-- no debconf information
-------------- next part --------------
>From 1a5124b24061994d6675eb386e90a9c3828511d0 Mon Sep 17 00:00:00 2001
From: carl <carl at sid.(none)>
Date: Tue, 9 Mar 2010 18:02:41 +0100
Subject: [PATCH] dont ask ui question if only one available
---
bin/reportbug | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/bin/reportbug b/bin/reportbug
index d0f83f5..3f1c6f8 100755
--- a/bin/reportbug
+++ b/bin/reportbug
@@ -516,9 +516,12 @@ def offer_configuration(options):
order=utils.MODELIST)
if options.configure or not options.interface:
- interface = ui.menu(
- 'Please choose the default interface for reportbug.', AVAILABLE_UIS,
- 'Select interface: ', options.interface, order=['text'])
+ if len(AVAILABLE_UIS) == 1:
+ interface = 'text'
+ else:
+ interface = ui.menu(
+ 'Please choose the default interface for reportbug.', AVAILABLE_UIS,
+ 'Select interface: ', options.interface, order=['text'])
else:
interface = options.interface
--
1.6.5.4
More information about the Reportbug-maint
mailing list