Bug 1581197 - Remove unused Android device parameter from `mozproxy`. r=tarek

Differential Revision: https://phabricator.services.mozilla.com/D45885

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Nick Alexander 2019-09-16 18:35:15 +00:00
Родитель c54d5ffdf9
Коммит 93d82bb882
4 изменённых файлов: 4 добавлений и 15 удалений

Просмотреть файл

@ -25,7 +25,7 @@ else:
mozharness_dir = path_join(mozbase_dir, "..", "mozharness")
def get_playback(config, android_device=None):
def get_playback(config):
""" Returns an instance of the right Playback class
"""
sys.path.insert(0, mozharness_dir)
@ -40,10 +40,7 @@ def get_playback(config, android_device=None):
LOG.critical("playback_tool name not found in config")
return None
try:
if android_device is None:
return get_backend(tool_name, config)
else:
return get_backend(tool_name, config, android_device)
return get_backend(tool_name, config)
except KeyError:
LOG.critical("specified playback tool is unsupported: %s" % tool_name)
return None

Просмотреть файл

@ -10,9 +10,8 @@ from abc import ABCMeta, abstractmethod
class Playback(object):
__metaclass__ = ABCMeta
def __init__(self, config, android_device=None):
def __init__(self, config):
self.config = config
self.android_device = android_device
@abstractmethod
def download(self):

Просмотреть файл

@ -287,9 +287,6 @@ class Mitmproxy(Playback):
class MitmproxyDesktop(Mitmproxy):
def __init__(self, config):
Mitmproxy.__init__(self, config)
def setup(self):
"""
Installs certificates.
@ -396,10 +393,6 @@ class MitmproxyDesktop(Mitmproxy):
class MitmproxyAndroid(Mitmproxy):
def __init__(self, config, android_device):
Mitmproxy.__init__(self, config)
self.android_device = android_device
@property
def certutil_sleep_seconds(self):
"""Time to sleep, in seconds, after issuing a `certutil` command."""

Просмотреть файл

@ -307,7 +307,7 @@ either Raptor or browsertime."""
def start_playback(self, test):
# creating the playback tool
self.get_playback_config(test)
self.playback = get_playback(self.config, self.device)
self.playback = get_playback(self.config)
self.playback.config['playback_files'] = self.get_recording_paths(test)