[Reportbug-commits] [SCM] Reportbug - reports bugs in the Debian distribution branch, master, updated. 4.9-45-gd9e1493
Sandro Tosi
morph at debian.org
Mon Jan 11 19:21:57 UTC 2010
The following commit has been merged in the master branch:
commit 9018cb6d5af635fd6a9bce0879e74c46a24588fb
Author: Sandro Tosi <morph at debian.org>
Date: Mon Jan 11 19:52:32 2010 +0100
fix broken '--mutt' CLI/config-file option by using a new variable, adding the 'mutt' 'if' branch, and the 'get_name()' in MUA class; thanks to Julien Cristau for the report; Closes: #564253
diff --git a/debian/changelog b/debian/changelog
index e135325..d21dfa8 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,8 +2,12 @@ reportbug (4.11~WIP) UNRELEASED; urgency=low
* bin/reportbug
- import LICENSE from reportbug, so --license won't trigger an error
+ * reportbug/utils.py
+ - fix broken '--mutt' CLI/config-file option by using a new variable, adding
+ the 'mutt' 'if' branch, and the 'get_name()' in MUA class; thanks to
+ Julien Cristau for the report; Closes: #564253
- -- Sandro Tosi <morph at debian.org> Fri, 08 Jan 2010 01:18:38 +0100
+ -- Sandro Tosi <morph at debian.org> Mon, 11 Jan 2010 19:45:35 +0100
reportbug (4.10) unstable; urgency=low
diff --git a/reportbug/utils.py b/reportbug/utils.py
index e6f861f..3a4f997 100644
--- a/reportbug/utils.py
+++ b/reportbug/utils.py
@@ -769,6 +769,9 @@ class Mua:
mua += ' %s'
return ui.system(mua % commands.mkarg(filename)[1:])
+ def get_name(self):
+ return self.name
+
class Gnus(Mua):
name = "gnus"
@@ -801,16 +804,16 @@ MUAVERSION = {
def mua_is_supported(mua):
# check if the mua is supported by reportbug
if mua == 'mh' or mua == MUA['mh']:
- mua = 'mh'
+ mua_tmp = 'mh'
elif mua == 'nmh' or mua == MUA['nmh']:
- mua = 'mh'
+ mua_tmp = 'mh'
elif mua == 'gnus' or mua == MUA['gnus']:
- mua = 'gnus'
+ mua_tmp = 'gnus'
+ elif mua == 'mutt' or mua == MUA['mutt']:
+ mua_tmp = 'mutt'
else:
- pass
- # FIXME: to adapt to new OO-style; previously it was:
- # mua = mua.split()[0]
- if mua not in MUA:
+ mua_tmp = mua
+ if mua_tmp not in MUA:
return False
else:
return True
@@ -818,21 +821,23 @@ def mua_is_supported(mua):
def mua_exists(mua):
# check if the mua is available on the system
if mua == 'mh' or mua == MUA['mh']:
- mua = MUA['mh']
+ mua_tmp = MUA['mh']
elif mua == 'nmh' or mua == MUA['nmh']:
- mua = MUA['mh']
+ mua_tmp = MUA['mh']
elif mua == 'gnus' or mua == MUA['gnus']:
- mua = MUA['gnus']
+ mua_tmp = MUA['gnus']
+ elif mua == 'mutt' or mua == MUA['mutt']:
+ mua_tmp = MUA['mutt']
else:
- mua = MUA[mua]
+ mua_tmp = MUA[mua]
output = '/dev/null'
if os.path.exists(output):
try:
- returnvalue = subprocess.call(MUAVERSION[mua], stdout=open(output, 'w'), stderr=subprocess.STDOUT, shell=True)
+ returnvalue = subprocess.call(MUAVERSION[mua_tmp], stdout=open(output, 'w'), stderr=subprocess.STDOUT, shell=True)
except IOError, OSError:
- returnvalue = subprocess.call(MUAVERSION[mua], shell=True)
+ returnvalue = subprocess.call(MUAVERSION[mua_tmp], shell=True)
else:
- returnvalue = subprocess.call(MUAVERSION[mua], shell=True)
+ returnvalue = subprocess.call(MUAVERSION[mua_tmp], shell=True)
# 127 is the shell standard return value to indicate a 'command not found' result
if returnvalue == 127:
return False
--
Reportbug - reports bugs in the Debian distribution
More information about the Reportbug-commits
mailing list