Closed ponty closed 12 years ago
It would be better if I could catch a library specific exception in case of communication error. This is my code now, it caches everything:
pa = eeml.Pachube(feed, key) pa.update([eeml.Data(stream, round(x.celsius, 1), unit=Celsius()), ]) try: pa.put() except Exception, e: # better: except PachubeError, e: print e
library specific exception examples: http://docs.python.org/tutorial/errors.html#user-defined-exceptions
Hi ponty,
Can you provide a patch for this?
Peter
Thanks, it's merged.
It would be better if I could catch a library specific exception in case of communication error. This is my code now, it caches everything:
library specific exception examples: http://docs.python.org/tutorial/errors.html#user-defined-exceptions