[PATCH] message to warn the user if trying to use mua and attachments
Carl Chenet
carl.chenet at ohmytux.com
Tue May 12 21:06:08 UTC 2009
---
bin/reportbug | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/bin/reportbug b/bin/reportbug
index 3fba286..9d0c146 100755
--- a/bin/reportbug
+++ b/bin/reportbug
@@ -847,6 +847,7 @@ def main():
# check if attachment files exist, else exiting
# all are checked, and it doesn't exit at the first missing
+
if options.attachments:
any_missing = False
for attachment in options.attachments:
@@ -859,6 +860,7 @@ def main():
if options.mua:
+ ewrite('Attachments are incompatible with using an MUA. They will be ignored.\n')
if not utils.mua_exists(options.mua):
ewrite("Selected mail user agent cannot be found; exiting.\n")
sys.exit(1)
@@ -984,8 +986,8 @@ class UI(object):
ui.long_message('*** Warning: %s is no longer an appropriate smtphost setting for reportbug: it has been superseded by reportbug.debian.org and this one is forced as smtphost; please update your .reportbugrc file.\n', smtphost.lower())
smtphost = 'reportbug.debian.org'
+ # Remove attachments from the command line if mua is required
if attachments and mua:
- ewrite('Attachments are incompatible with using an MUA. They will be ignored.\n')
attachments = []
if utils.first_run():
--
1.5.4.3
--=-3aGBW9s1uvzhCza0oLQu--
More information about the Reportbug-maint
mailing list