Formatted more docstrings

This commit is contained in:
Rudi Grinberg 2012-10-25 14:50:08 -04:00
parent 0f1e843017
commit 2e54fd64d3
2 changed files with 6 additions and 11 deletions

View File

@ -24,15 +24,12 @@ class Loggable(object):
def logger(self): return get_logger() def logger(self): return get_logger()
def unexpected_exception(self,e): def unexpected_exception(self,e):
""" """ Default message for 'unexpected' exceptions """
Default message for 'unexpected' exceptions
"""
self.fatal_exception("'Unexpected' exception has occured:", e) self.fatal_exception("'Unexpected' exception has occured:", e)
def fatal_exception(self, message, e): def fatal_exception(self, message, e):
""" """ Prints an exception 'e' with 'message'. Also outputs the
Prints an exception 'e' with 'message'. Also outputs the traceback. traceback. """
"""
self.logger.error( message ) self.logger.error( message )
self.logger.error( str(e) ) self.logger.error( str(e) )
self.logger.error( traceback.format_exc() ) self.logger.error( traceback.format_exc() )

View File

@ -17,11 +17,9 @@ class ThreadedRequestSync(threading.Thread, Loggable):
self.rs.run_request() self.rs.run_request()
class RequestSync(Loggable): class RequestSync(Loggable):
""" """ This class is responsible for making the api call to send a
This class is responsible for making the api call to send a request request to airtime. In the process it packs the requests and retries
to airtime. In the process it packs the requests and retries for for some number of times """
some number of times
"""
@classmethod @classmethod
def create_with_api_client(cls, watcher, requests): def create_with_api_client(cls, watcher, requests):
apiclient = ac.AirtimeApiClient.create_right_config() apiclient = ac.AirtimeApiClient.create_right_config()