[CalendarServer-changes] [11357] CalendarServer/trunk/twext/python/log.py
source_changes at macosforge.org
source_changes at macosforge.org
Thu Jun 13 16:39:44 PDT 2013
Revision: 11357
http://trac.calendarserver.org//changeset/11357
Author: wsanchez at apple.com
Date: 2013-06-13 16:39:44 -0700 (Thu, 13 Jun 2013)
Log Message:
-----------
Yay bare except
Modified Paths:
--------------
CalendarServer/trunk/twext/python/log.py
Modified: CalendarServer/trunk/twext/python/log.py
===================================================================
--- CalendarServer/trunk/twext/python/log.py 2013-06-13 23:21:13 UTC (rev 11356)
+++ CalendarServer/trunk/twext/python/log.py 2013-06-13 23:39:44 UTC (rev 11357)
@@ -286,10 +286,10 @@
return formatWithCall(format, event)
- except Exception as e:
+ except BaseException as e:
try:
return cls.formatUnformattableEvent(event, e)
- except Exception:
+ except:
return u"MESSAGE LOST"
@@ -310,7 +310,7 @@
u"Unable to format event {event}: {error}"
.format(event=event, error=error)
)
- except Exception as error:
+ except BaseException as error:
#
# Yikes, something really nasty happened.
#
@@ -324,15 +324,15 @@
for key, value in event.items():
try:
items.append(u"{key} = ".format(key=key))
- except Exception:
+ except:
items.append(u"<UNFORMATTABLE KEY> = ")
try:
items.append(u"{value}".format(value=value))
- except Exception:
+ except:
items.append(u"<UNFORMATTABLE VALUE>")
text = ", ".join(items)
- except Exception:
+ except:
text = ""
return (
@@ -557,9 +557,7 @@
for observer in self.observers:
try:
observer(event)
- except KeyboardInterrupt:
- raise
- except Exception:
+ except:
#
# We have to remove the offending observer because
# we're going to badmouth it to all of its friends
@@ -570,7 +568,7 @@
try:
self.log.failure("Observer {observer} raised an exception; removing.")
Failure().printTraceback()
- except Exception:
+ except:
pass
finally:
self.addObserver(observer)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20130613/f585c23c/attachment.html>
More information about the calendarserver-changes
mailing list