[Checkins] SVN: zc.z3monitor/branches/dev/s fix apparent bug

Benji York benji at zope.com
Tue Sep 18 16:00:11 EDT 2007


Log message for revision 79738:
  fix apparent bug
  

Changed:
  U   zc.z3monitor/branches/dev/setup.py
  U   zc.z3monitor/branches/dev/src/zc/z3monitor/__init__.py

-=-
Modified: zc.z3monitor/branches/dev/setup.py
===================================================================
--- zc.z3monitor/branches/dev/setup.py	2007-09-18 12:20:50 UTC (rev 79737)
+++ zc.z3monitor/branches/dev/setup.py	2007-09-18 20:00:10 UTC (rev 79738)
@@ -3,13 +3,13 @@
 name = 'zc.z3monitor'
 setup(
     name = name,
-    version = '0.1.1b1',
+    version = '0.1.1b2',
     author = 'Jim Fulton',
     author_email = 'jim at zope.com',
     description = 'Zope 3 Monitor',
     license = 'ZPL 2.1',
     keywords = 'zope3',
-    
+
     packages = find_packages('src'),
     namespace_packages = ['zc'],
     package_dir = {'': 'src'},

Modified: zc.z3monitor/branches/dev/src/zc/z3monitor/__init__.py
===================================================================
--- zc.z3monitor/branches/dev/src/zc/z3monitor/__init__.py	2007-09-18 12:20:50 UTC (rev 79737)
+++ zc.z3monitor/branches/dev/src/zc/z3monitor/__init__.py	2007-09-18 20:00:10 UTC (rev 79738)
@@ -77,7 +77,14 @@
             if not opened:
                 continue
             nconnections += 1
-            age = float(self.opened_time_search(opened).group(1))
+            match = self.opened_time_search(opened)
+            # XXX the code originally didn't make sure a there was really a
+            # match; which caused exceptions in some (unknown) circumstances
+            # that we weren't able to reproduce; this hack keeps that from
+            # happening
+            if not match:
+                continue
+            age = float(match.group(1))
             if age < min:
                 continue
             result.append((age, data['info']))



More information about the Checkins mailing list