Skip to content
Permalink
Browse files

Python 3: Fix some old-style/urlparse imports.

  • Loading branch information
Ms2ger authored and jgraham committed Jan 14, 2020
1 parent 440014f commit f104e7c3feb0cea1febbe715f57614f204e235aa
@@ -6,14 +6,14 @@
import errno
import subprocess
import tempfile
import urlparse
from abc import ABCMeta, abstractmethod
from datetime import datetime, timedelta
from distutils.spawn import find_executable

from six.moves.urllib.parse import urlsplit
import requests

from utils import call, get, untar, unzip
from .utils import call, get, untar, unzip

uname = platform.uname()

@@ -172,7 +172,7 @@ def download(self, dest=None, channel="nightly"):
filename = filenames[0]

if not filename:
filename = urlparse.urlsplit(resp.url).path.rsplit("/", 1)[1]
filename = urlsplit(resp.url).path.rsplit("/", 1)[1]

if not filename:
filename = "firefox.tar.bz2"
@@ -1,6 +1,6 @@
import argparse
import browser
import sys
from . import browser


latest_channels = {
@@ -3,9 +3,10 @@
import threading
import time
import traceback
import urlparse
import uuid

from six.moves.urllib.parse import urljoin

errors = None
marionette = None
pytestrunner = None
@@ -132,8 +133,7 @@ def load_runner(self, url_protocol):
# Check if we previously had a test window open, and if we did make sure it's closed
if self.runner_handle:
self._close_windows()
url = urlparse.urljoin(self.parent.executor.server_url(url_protocol),
"/testharness_runner.html")
url = urljoin(self.parent.executor.server_url(url_protocol), "/testharness_runner.html")
self.logger.debug("Loading %s" % url)
try:
self.dismiss_alert(lambda: self.marionette.navigate(url))
@@ -893,7 +893,7 @@ def logger(self):
def setup(self, screenshot="unexpected"):
data = {"screenshot": screenshot}
if self.executor.group_metadata is not None:
data["urlCount"] = {urlparse.urljoin(self.executor.server_url(key[0]), key[1]):value
data["urlCount"] = {urljoin(self.executor.server_url(key[0]), key[1]):value
for key, value in self.executor.group_metadata.get("url_count", {}).iteritems()
if value > 1}
self.executor.protocol.marionette.set_context(self.executor.protocol.marionette.CONTEXT_CHROME)
@@ -93,7 +93,7 @@ def __init__(self, metadata_root, product, debug,
self._update_mozinfo(metadata_root)
self.update(mozinfo.info)

from update.tree import GitTree
from .update.tree import GitTree
try:
# GitTree.__init__ throws if we are not in a git tree.
rev = GitTree(log_error=False).rev

0 comments on commit f104e7c

Please sign in to comment.
You can’t perform that action at this time.