<?xml version="1.0" encoding="UTF-8" ?>
<rdf:RDF xmlns="http://usefulinc.com/ns/doap#" xmlns:foaf="http://xmlns.com/foaf/0.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><Project><name>errorhandler</name>
<shortdesc>A logging framework handler that tracks when messages above a certain level have been logged.</shortdesc>
<description>============
ErrorHandler
============

This is a handler for the python standard logging framework that can
be used to tell whether messages have been logged at or above a
certain level.

This can be useful when wanting to ensure that no errors have been
logged before committing data back to a database.

As an example, first, you set up the error handler:

&gt;&gt;&gt; from errorhandler import ErrorHandler
&gt;&gt;&gt; e = ErrorHandler()

Then you can log and check the handler at any point to see if it has
been triggered:

&gt;&gt;&gt; e.fired
False
&gt;&gt;&gt; from logging import getLogger
&gt;&gt;&gt; logger = getLogger()
&gt;&gt;&gt; logger.error('an error')
&gt;&gt;&gt; e.fired
True

You can use the `fired` attribute to only perform actions when no
errors have been logged:

&gt;&gt;&gt; if e.fired:
...   print "Not updating files as errors have occurred"
Not updating files as errors have occurred</description>
<homepage rdf:resource="http://www.simplistix.co.uk/software/python/errorhandler" />
<maintainer><foaf:Person><foaf:name>Chris Withers</foaf:name>
<foaf:mbox_sha1sum>55a9fd2696f599ece1afb8c13a46c412450a97e3</foaf:mbox_sha1sum></foaf:Person></maintainer>
<release><Version><revision>1.1.0</revision></Version></release>
</Project></rdf:RDF>