From e68a9596413481c2aca71ad573acf71b310c2f20 Mon Sep 17 00:00:00 2001 From: Oliver Palmer Date: Sun, 14 Sep 2014 23:16:44 -0400 Subject: [PATCH 1/3] add missing BAD_REQUEST --- pyfarm/master/api/tasklogs.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pyfarm/master/api/tasklogs.py b/pyfarm/master/api/tasklogs.py index 10f7104c..4dcbad76 100644 --- a/pyfarm/master/api/tasklogs.py +++ b/pyfarm/master/api/tasklogs.py @@ -23,9 +23,11 @@ """ try: - from httplib import OK, NOT_FOUND, CONFLICT, TEMPORARY_REDIRECT, CREATED + from httplib import ( + OK, NOT_FOUND, CONFLICT, TEMPORARY_REDIRECT, CREATED, BAD_REQUEST) except ImportError: # pragma: no cover - from http.client import OK, NOT_FOUND, CONFLICT, TEMPORARY_REDIRECT, CREATED + from http.client import ( + OK, NOT_FOUND, CONFLICT, TEMPORARY_REDIRECT, CREATED, BAD_REQUEST) import tempfile from os import makedirs From 53d85ae0957db94949253ca291caba6948a7721f Mon Sep 17 00:00:00 2001 From: Oliver Palmer Date: Sun, 14 Sep 2014 23:17:03 -0400 Subject: [PATCH 2/3] add missing INTERNAL_SERVER_ERROR --- pyfarm/master/api/tasklogs.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pyfarm/master/api/tasklogs.py b/pyfarm/master/api/tasklogs.py index 4dcbad76..1295a4ec 100644 --- a/pyfarm/master/api/tasklogs.py +++ b/pyfarm/master/api/tasklogs.py @@ -24,10 +24,12 @@ try: from httplib import ( - OK, NOT_FOUND, CONFLICT, TEMPORARY_REDIRECT, CREATED, BAD_REQUEST) + OK, NOT_FOUND, CONFLICT, TEMPORARY_REDIRECT, CREATED, BAD_REQUEST, + INTERNAL_SERVER_ERROR) except ImportError: # pragma: no cover from http.client import ( - OK, NOT_FOUND, CONFLICT, TEMPORARY_REDIRECT, CREATED, BAD_REQUEST) + OK, NOT_FOUND, CONFLICT, TEMPORARY_REDIRECT, CREATED, BAD_REQUEST, + INTERNAL_SERVER_ERROR) import tempfile from os import makedirs From 445ede067db3b3ac208f0eff204744e6769e9160 Mon Sep 17 00:00:00 2001 From: Oliver Palmer Date: Sun, 14 Sep 2014 23:17:26 -0400 Subject: [PATCH 3/3] remove unused import --- pyfarm/master/api/tasklogs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyfarm/master/api/tasklogs.py b/pyfarm/master/api/tasklogs.py index 1295a4ec..317993e7 100644 --- a/pyfarm/master/api/tasklogs.py +++ b/pyfarm/master/api/tasklogs.py @@ -33,7 +33,7 @@ import tempfile from os import makedirs -from os.path import join, isfile, realpath +from os.path import join, realpath from errno import EEXIST from flask.views import MethodView