mirror of
https://github.com/valitydev/yandex-tank.git
synced 2024-11-06 18:35:18 +00:00
opener improvements
This commit is contained in:
parent
bf6753f178
commit
79cb17d4d5
@ -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()
|
||||
|
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user