Using Tools/Scripts/clean-webkit should not install requests
authordean_johnson@apple.com <dean_johnson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 16 Apr 2019 00:00:48 +0000 (00:00 +0000)
committerdean_johnson@apple.com <dean_johnson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 16 Apr 2019 00:00:48 +0000 (00:00 +0000)
https://bugs.webkit.org/show_bug.cgi?id=196940

Reviewed by Lucas Forschler.

* Scripts/webkitpy/common/system/autoinstall.py: Drive-by fix for no logging handlers
existing, depending on the path autoinstalled is run through.
* Scripts/webkitpy/port/base.py: Import webkitpy.results.upload.Upload only where it's
needed.
(Port.configuration_for_upload):
(Port.commits_for_upload):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244310 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Tools/ChangeLog
Tools/Scripts/webkitpy/common/system/autoinstall.py
Tools/Scripts/webkitpy/port/base.py

index 02d27da..8d046d8 100644 (file)
@@ -1,3 +1,17 @@
+2019-04-15  Dean Johnson  <dean_johnson@apple.com>
+
+        Using Tools/Scripts/clean-webkit should not install requests
+        https://bugs.webkit.org/show_bug.cgi?id=196940
+
+        Reviewed by Lucas Forschler.
+
+        * Scripts/webkitpy/common/system/autoinstall.py: Drive-by fix for no logging handlers
+        existing, depending on the path autoinstalled is run through.
+        * Scripts/webkitpy/port/base.py: Import webkitpy.results.upload.Upload only where it's
+        needed.
+        (Port.configuration_for_upload):
+        (Port.commits_for_upload):
+
 2019-04-15  Alex Christensen  <achristensen@webkit.org>
 
         Add a DiagnosticLogging method taking an arbitrary dictionary of values.
index 84d4064..5a9423b 100644 (file)
@@ -47,7 +47,15 @@ from distutils import dir_util
 from glob import glob
 import urlparse
 
+
 _log = logging.getLogger(__name__)
+if not _log.handlers:  # No parent loggers setup.
+    handler = logging.StreamHandler()
+    handler.setLevel(logging.INFO)
+    formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')
+    handler.setFormatter(formatter)
+    _log.addHandler(handler)
+
 _MIRROR_REGEXS = re.compile('.*sourceforge.*'), re.compile('.*pypi.*')
 _PYPI_ENV_VAR = 'PYPI_MIRRORS'
 _SOURCEFORGE_ENV_VAR = 'SOURCEFORGE_MIRRORS'
index f5c9476..d06799c 100644 (file)
@@ -62,7 +62,6 @@ from webkitpy.port.factory import PortFactory
 from webkitpy.layout_tests.servers import apache_http_server, http_server, http_server_base
 from webkitpy.layout_tests.servers import web_platform_test_server
 from webkitpy.layout_tests.servers import websocket_server
-from webkitpy.results.upload import Upload
 
 _log = logging.getLogger(__name__)
 
@@ -1638,6 +1637,8 @@ class Port(object):
         pass
 
     def configuration_for_upload(self, host=None):
+        from webkitpy.results.upload import Upload
+
         configuration = self.test_configuration()
         host = self.host or host
 
@@ -1652,12 +1653,13 @@ class Port(object):
 
     @memoized
     def commits_for_upload(self):
+        from webkitpy.results.upload import Upload
+
         self.host.initialize_scm()
 
+        repos = {}
         if port_config.apple_additions() and getattr(port_config.apple_additions(), 'repos', False):
             repos = port_config.apple_additions().repos()
-        else:
-            repos = {}
 
         up = os.path.dirname
         repos['webkit'] = up(up(up(up(up(os.path.abspath(__file__))))))