[PATCH] Force to provide a wnpp package name
Carl Chenet
carl.chenet at ohmytux.com
Sun May 24 10:53:28 UTC 2009
---
reportbug/debianbts.py | 17 +++++++++++------
1 files changed, 11 insertions(+), 6 deletions(-)
diff --git a/reportbug/debianbts.py b/reportbug/debianbts.py
index fa7bbb2..6baf155 100644
--- a/reportbug/debianbts.py
+++ b/reportbug/debianbts.py
@@ -355,12 +355,17 @@ def handle_wnpp(package, bts, ui, fromaddr, online=True, http_proxy=None):
ui.long_message('To report a bug in a package, use the name of the package, not wnpp.\n')
raise SystemExit
- if tag in ('RFP', 'ITP'):
- prompt = 'Please enter the proposed package name: '
- else:
- prompt = 'Please enter the name of the package: '
- package = ui.get_string(prompt)
- if not package: return
+ has_name = False
+ while not has_name:
+ if tag in ('RFP', 'ITP'):
+ prompt = 'Please enter the proposed package name: '
+ else:
+ prompt = 'Please enter the name of the package: '
+ package = ui.get_string(prompt)
+ if not package:
+ ui.long_message('You need to provide a package name\n')
+ else:
+ has_name = True
ui.log_message('Checking status database...\n')
info = utils.get_package_status(package)
--
1.5.4.3
--=-K8uW+Lkzqy0Xje7egxcU--
More information about the Reportbug-maint
mailing list