]> code.delx.au - gnu-emacs-elpa/commitdiff
* debbugs.el (debbugs-get-status): Handle the case of nil BUG-NUMBERS.
authorMichael Albinus <michael.albinus@gmx.de>
Tue, 6 Sep 2011 07:18:24 +0000 (09:18 +0200)
committerMichael Albinus <michael.albinus@gmx.de>
Tue, 6 Sep 2011 07:18:24 +0000 (09:18 +0200)
packages/debbugs/ChangeLog
packages/debbugs/debbugs.el

index bb174fd9c356f2427e3a58afcfde54f4b6f0b16a..e7f7ae63791ff0c6a9d9022eeceae12984b24ec5 100644 (file)
@@ -1,3 +1,8 @@
+2011-09-06  Michael Albinus  <michael.albinus@gmx.de>
+
+       * debbugs.el (debbugs-get-status): Handle the case of nil
+       BUG-NUMBERS.
+
 2011-08-12  Michael Albinus  <michael.albinus@gmx.de>
 
        * Debbugs.wsdl (ArrayOfArrayOfAnyType)
index 4e5f5bd7da000aca0b3a60b86c76262236d3d4f8..550d55496cdda3db1f5b57fd0100e9272dba7c50 100644 (file)
@@ -288,37 +288,38 @@ Example:
        \(last_modified . 1271200046.0)
        \(pending . \"pending\")
        \(package \"emacs\")))"
-  (let ((object
-        (car
-         (soap-invoke
-          debbugs-wsdl debbugs-port "get_status"
-          (apply 'vector bug-numbers)))))
-    (mapcar
-     (lambda (x)
-       (let (y)
-        ;; "archived" is the number 1 or 0.
-        (setq y (assoc 'archived (cdr (assoc 'value x))))
-        (setcdr y (= (cdr y) 1))
-        ;; "found_versions" and "fixed_versions" are lists,
-        ;; containing strings or numbers.
-        (dolist (attribute '(found_versions fixed_versions))
-          (setq y (assoc attribute (cdr (assoc 'value x))))
-          (setcdr y (mapcar
-                     (lambda (z) (if (numberp z) (number-to-string z) z))
-                     (cdr y))))
-        ;; "mergedwith" is a string, containing blank separated bug numbers.
-        (setq y (assoc 'mergedwith (cdr (assoc 'value x))))
-        (when (stringp (cdr y))
-          (setcdr y (mapcar 'string-to-number (split-string (cdr y) " " t))))
-        ;; "package" is a string, containing comma separated package names.
-        ;; "keywords" and "tags" are strings, containing blank
-        ;; separated package names.
-        (dolist (attribute '(package keywords tags))
-          (setq y (assoc attribute (cdr (assoc 'value x))))
+  (when bug-numbers
+    (let ((object
+          (car
+           (soap-invoke
+            debbugs-wsdl debbugs-port "get_status"
+            (apply 'vector bug-numbers)))))
+      (mapcar
+       (lambda (x)
+        (let (y)
+          ;; "archived" is the number 1 or 0.
+          (setq y (assoc 'archived (cdr (assoc 'value x))))
+          (setcdr y (= (cdr y) 1))
+          ;; "found_versions" and "fixed_versions" are lists,
+          ;; containing strings or numbers.
+          (dolist (attribute '(found_versions fixed_versions))
+            (setq y (assoc attribute (cdr (assoc 'value x))))
+            (setcdr y (mapcar
+                       (lambda (z) (if (numberp z) (number-to-string z) z))
+                       (cdr y))))
+          ;; "mergedwith" is a string, containing blank separated bug numbers.
+          (setq y (assoc 'mergedwith (cdr (assoc 'value x))))
           (when (stringp (cdr y))
-            (setcdr y (split-string (cdr y) ",\\| " t))))
-        (cdr (assoc 'value x))))
-     object)))
+            (setcdr y (mapcar 'string-to-number (split-string (cdr y) " " t))))
+          ;; "package" is a string, containing comma separated
+          ;; package names.  "keywords" and "tags" are strings,
+          ;; containing blank separated package names.
+          (dolist (attribute '(package keywords tags))
+            (setq y (assoc attribute (cdr (assoc 'value x))))
+            (when (stringp (cdr y))
+              (setcdr y (split-string (cdr y) ",\\| " t))))
+          (cdr (assoc 'value x))))
+       object))))
 
 (defun debbugs-get-bug-log (bug-number)
   "Return a list of messages related to BUG-NUMBER.