diff --git a/yandextank/core/resource.py b/yandextank/core/resource.py index a433fee..d4d9707 100644 --- a/yandextank/core/resource.py +++ b/yandextank/core/resource.py @@ -73,7 +73,7 @@ class Opener(object): path: str, resource file url or resource file absolute/relative path. Returns: - object, to call for file open. + file object """ self.path = path opener = None @@ -86,7 +86,6 @@ class Opener(object): opener = FileOpener(self.path) return opener - class FileOpener(object): """ File opener. """ @@ -367,3 +366,5 @@ class HttpStreamWrapper: return self.next() except StopIteration: return '' + +Opener = Opener() diff --git a/yandextank/core/tankcore.py b/yandextank/core/tankcore.py index f111069..6be3688 100644 --- a/yandextank/core/tankcore.py +++ b/yandextank/core/tankcore.py @@ -620,7 +620,7 @@ class ConfigManager(object): """ Read configs set into storage """ self.log.debug("Reading configs: %s", configs) for config in configs: - filename = Opener().resource_filename(config) + filename = Opener.resource_filename(config) configs.remove(config) configs.append(filename) try: