[26179] in Source-Commits

home help back first fref pref prev next nref lref last post

/svn/athena r25441 - in trunk/debathena/config/printing-config: debathena/printing debian

daemon@ATHENA.MIT.EDU (Geoffrey Thomas)
Thu Nov 17 12:54:21 2011

Date: Thu, 17 Nov 2011 12:54:20 -0500
From: Geoffrey Thomas <geofft@MIT.EDU>
Message-Id: <201111171754.pAHHsK3T004871@drugstore.mit.edu>
To: source-commits@MIT.EDU
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Author: geofft
Date: 2011-11-17 12:54:19 -0500 (Thu, 17 Nov 2011)
New Revision: 25441

Modified:
   trunk/debathena/config/printing-config/debathena/printing/common.py
   trunk/debathena/config/printing-config/debian/changelog
Log:
In printing-config:
  * Handle an empty Hesiod result set more gracefully (not sure if this
    is possible, but it's worth being robust to)


Modified: trunk/debathena/config/printing-config/debathena/printing/common.py
===================================================================
--- trunk/debathena/config/printing-config/debathena/printing/common.py	2011-11-15 16:47:24 UTC (rev 25440)
+++ trunk/debathena/config/printing-config/debathena/printing/common.py	2011-11-17 17:54:19 UTC (rev 25441)
@@ -32,8 +32,7 @@
     """A wrapper with somewhat graceful error handling."""
     try:
         h = hesiod.Lookup(hes_name, hes_type)
-        if len(h.results) > 0:
-            return h.results
+        return h.results
     except IOError:
         return []
 

Modified: trunk/debathena/config/printing-config/debian/changelog
===================================================================
--- trunk/debathena/config/printing-config/debian/changelog	2011-11-15 16:47:24 UTC (rev 25440)
+++ trunk/debathena/config/printing-config/debian/changelog	2011-11-17 17:54:19 UTC (rev 25441)
@@ -1,3 +1,10 @@
+debathena-printing-config (1.28) UNRELEASED; urgency=low
+
+  * Handle an empty Hesiod result set more gracefully (not sure if this
+    is possible, but it's worth being robust to)
+
+ -- Geoffrey Thomas <geofft@mit.edu>  Thu, 17 Nov 2011 12:50:02 -0500
+
 debathena-printing-config (1.27) unstable; urgency=low
 
   * Build-dep on debathena-cups because in Oneiric, python-cups stopped


home help back first fref pref prev next nref lref last post