[Reportbug-commits] [SCM] Reportbug - reports bugs in the Debian distribution branch, master, updated. 4.4-11-gdb6e542

Sandro Tosi morph at debian.org
Wed Jun 3 21:12:12 UTC 2009


The following commit has been merged in the master branch:
commit 28c364fa18523c09b70b099c2fe695f9dccdc1b6
Author: Carl Chenet <carl.chenet at ohmytux.com>
Date:   Wed Jun 3 19:13:11 2009 +0200

    * reportbug/utils.py - provide good checks for MUA having a different command than its name (gnus->emacs)

diff --git a/reportbug/utils.py b/reportbug/utils.py
index d663e7e..fac6e8b 100644
--- a/reportbug/utils.py
+++ b/reportbug/utils.py
@@ -767,14 +767,29 @@ MUAVERSION = {
 
 def mua_is_supported(mua):
     # check if the mua is supported by reportbug
-    if mua.split()[0] not in MUA:
+    if mua == 'mh' or mua == MUA['mh']:
+        mua = 'mh'
+    elif mua == 'nmh' or mua == MUA['nmh']:
+        mua = 'mh'
+    elif mua == 'gnus' or mua == MUA['gnus']:
+        mua = 'gnus'
+    else:
+        mua = mua.split()[0]
+    if mua not in MUA:
         return False
     else:
         return True
 
 def mua_exists(mua):
     # check if the mua is available on the system
-    mua = MUA[mua.split()[0]]
+    if mua == 'mh' or mua == MUA['mh']:
+        mua = MUA['mh']
+    elif mua == 'nmh' or mua == MUA['nmh']:
+        mua = MUA['mh']
+    elif mua == 'gnus' or mua == MUA['gnus']:
+        mua = MUA['gnus']
+    else:
+        mua = MUA[mua.split()[0]]
     output = '/dev/null'
     if os.path.exists(output):
         try:

-- 
Reportbug - reports bugs in the Debian distribution



More information about the Reportbug-commits mailing list