Fix tests failing due to no Settings
This commit is contained in:
1 parent
397e691a6a
commit
8485d2c9a7
1 file changed
+4
-3
@@ -19,7 +19,6 @@ from .analysis import QueueEntry, AnalysisQueue
|
||||
from .storage import LocalFileStorage
|
||||
from .util import AbstractFileWrapper, StreamWrapper, DiskFileWrapper
|
||||
from octoprint.util import get_fully_qualified_classname as fqcn
|
||||
from octoprint.settings import settings
|
||||
|
||||
from collections import namedtuple
|
||||
|
||||
@@ -224,7 +223,9 @@ class FileManager(object):
|
||||
self._progress_plugins = []
|
||||
self._preprocessor_hooks = dict()
|
||||
|
||||
self._recovery_file = os.path.join(settings().getBaseFolder("data"), "print_recovery_data.yaml")
|
||||
import octoprint.settings
|
||||
self._recovery_file = os.path.join(octoprint.settings.settings().getBaseFolder("data"), "print_recovery_data.yaml")
|
||||
self._analyzeGcode = octoprint.settings.settings().get(["gcodeAnalysis", "runAt"])
|
||||
|
||||
def initialize(self, process_backlog=False):
|
||||
self.reload_plugins()
|
||||
@@ -233,7 +234,7 @@ class FileManager(object):
|
||||
|
||||
def process_backlog(self):
|
||||
# only check for a backlog if gcodeAnalysis is 'idle' or 'always'
|
||||
if settings().get(["gcodeAnalysis", "runAt"]) == "never":
|
||||
if self._analyzeGcode == "never":
|
||||
return
|
||||
|
||||
def worker():
|
||||
|
||||
Reference in new issue
Block a user