[CalendarServer-changes] [7530] CalendarServer/trunk/contrib/performance/loadtest/sim.py
source_changes at macosforge.org
source_changes at macosforge.org
Thu May 26 13:08:43 PDT 2011
Revision: 7530
http://trac.macosforge.org/projects/calendarserver/changeset/7530
Author: exarkun at twistedmatrix.com
Date: 2011-05-26 13:08:42 -0700 (Thu, 26 May 2011)
Log Message:
-----------
Narrow the plist loading error handling; ExpatError turns into something nice and comprehensible, other possible exceptions turn into obscure impossible to debug blogs
Modified Paths:
--------------
CalendarServer/trunk/contrib/performance/loadtest/sim.py
Modified: CalendarServer/trunk/contrib/performance/loadtest/sim.py
===================================================================
--- CalendarServer/trunk/contrib/performance/loadtest/sim.py 2011-05-26 20:05:43 UTC (rev 7529)
+++ CalendarServer/trunk/contrib/performance/loadtest/sim.py 2011-05-26 20:08:42 UTC (rev 7530)
@@ -15,6 +15,7 @@
#
##
+from xml.parsers.expat import ExpatError
from sys import argv, stdout
from random import Random
from plistlib import readPlist
@@ -87,9 +88,8 @@
raise UsageError("--config %s: %s" % (path, e.strerror))
try:
self.config = readPlist(configFile)
- except Exception, e:
- raise UsageError(
- "--config %s: %s" % (path, str(e)))
+ except ExpatError, e:
+ raise UsageError("--config %s: %s" % (path, e))
def opt_logfile(self, filename):
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20110526/53c766bb/attachment.html>
More information about the calendarserver-changes
mailing list