From 88a962b3ab1e0b162dade8239ef51f1e19ca9229 Mon Sep 17 00:00:00 2001 From: Salandora Date: Sun, 1 Jul 2018 03:07:49 +0200 Subject: [PATCH] Fix for _test_url Snapshot test threw a 500 Internal Error. After some investigation (no exception got thrown, except in debug mode) I noticed that the test url function tried to access octoprint util which was not imported. Because util was used in different locations of this function I decided to put it at the top of the function right after import requests. --- src/octoprint/server/api/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/octoprint/server/api/__init__.py b/src/octoprint/server/api/__init__.py index 3af524481..6abf081a5 100644 --- a/src/octoprint/server/api/__init__.py +++ b/src/octoprint/server/api/__init__.py @@ -343,6 +343,7 @@ def _test_path(data): def _test_url(data): import requests + from octoprint import util as util class StatusCodeRange(object): def __init__(self, start=None, end=None):