Fix style issues

This commit is contained in:
Paulus Schoutsen 2015-02-07 15:54:58 -08:00
parent 33daf0a385
commit 09bf64db42
2 changed files with 7 additions and 1 deletions

View file

@ -51,7 +51,9 @@ def setup(hass, config):
def _handle_get_root(handler, path_match, data):
""" Renders the debug interface. """
write = lambda txt: handler.wfile.write((txt + "\n").encode("UTF-8"))
def write(txt):
""" Helper to write text to the output. """
handler.wfile.write((txt + "\n").encode("UTF-8"))
handler.send_response(HTTP_OK)
handler.send_header('Content-type', 'text/html; charset=utf-8')

View file

@ -78,6 +78,8 @@ def row_to_event(row):
def run_information(point_in_time=None):
""" Returns information about current run or the run that
covers point_in_time. """
_verify_instance()
if point_in_time is None:
@ -131,6 +133,8 @@ class RecorderRun(object):
@property
def where_after_start_run(self):
""" Returns SQL WHERE clause to select rows
created after the start of the run. """
return "created >= {} ".format(_adapt_datetime(self.start))
@property