|
|
@@ -317,9 +317,8 @@ class Stream(NilmApp): |
|
|
|
body = cherrypy.request.body.read() |
|
|
|
|
|
|
|
# Check path and get layout |
|
|
|
streams = self.db.stream_list(path = path) |
|
|
|
if len(streams) != 1: |
|
|
|
raise cherrypy.HTTPError("404 Not Found", "No such stream") |
|
|
|
if len(self.db.stream_list(path = path)) != 1: |
|
|
|
raise cherrypy.HTTPError("404", "No such stream: " + path) |
|
|
|
|
|
|
|
# Check limits |
|
|
|
(start, end) = self._get_times(start, end) |
|
|
@@ -416,9 +415,8 @@ class Stream(NilmApp): |
|
|
|
(start, end) = self._get_times(start, end) |
|
|
|
|
|
|
|
# Check path and get layout |
|
|
|
streams = self.db.stream_list(path = path) |
|
|
|
if len(streams) != 1: |
|
|
|
raise cherrypy.HTTPError("404 Not Found", "No such stream") |
|
|
|
if len(self.db.stream_list(path = path)) != 1: |
|
|
|
raise cherrypy.HTTPError("404", "No such stream: " + path) |
|
|
|
|
|
|
|
@workaround_cp_bug_1200 |
|
|
|
def content(start, end): |
|
|
|