better handling if can't get results
authorArthur Lutz <arthur.lutz@logilab.fr>
Mon, 30 Jun 2008 16:46:24 +0200
changeset 4 80b859422abf
parent 3 ea25521b42b5
child 5 a0d3ec1dccde
better handling if can't get results
zope_errors
--- a/zope_errors	Mon Jun 30 14:46:50 2008 +0200
+++ b/zope_errors	Mon Jun 30 16:46:24 2008 +0200
@@ -35,7 +35,11 @@
         data = r1.read().strip()
         conn.close()
         #print data
-        (error_count, type_count, user_count) = data.split()
+        error_count = type_count = user_count = ''
+        try:
+            (error_count, type_count, user_count) = data.split()
+        except ValueError:
+            pass
         id = dict(i=i)
         print 'error_count%(i)s.value' % id, error_count
         print 'type_count%(i)s.value'% id, type_count