Changeset 271158 in webkit


Ignore:
Timestamp:
Jan 5, 2021 10:33:43 AM (3 years ago)
Author:
ap@apple.com
Message:

Remove some unused variables from webkitpy
https://bugs.webkit.org/show_bug.cgi?id=220180

Reviewed by Aakash Jain, Sam Weinig and Jonathan Bedard.

  • Scripts/webkitpy/benchmark_runner/webdriver_benchmark_runner.py:
  • Scripts/webkitpy/benchmark_runner/webserver_benchmark_runner.py:
  • Scripts/webkitpy/codegen/main.py:
  • Scripts/webkitpy/common/checkout/changelog.py:
  • Scripts/webkitpy/common/checkout/checkout.py:
  • Scripts/webkitpy/common/checkout/scm/git.py:
  • Scripts/webkitpy/common/checkout/scm/svn.py:
  • Scripts/webkitpy/common/config/committers.py:
  • Scripts/webkitpy/common/config/contributionareas.py:
  • Scripts/webkitpy/common/message_pool.py:
  • Scripts/webkitpy/common/net/buildbot/buildbot.py:
  • Scripts/webkitpy/common/net/credentials.py:
  • Scripts/webkitpy/common/system/crashlogs.py:
  • Scripts/webkitpy/common/system/executive.py:
  • Scripts/webkitpy/common/system/profiler.py:
  • Scripts/webkitpy/common/system/user.py:
  • Scripts/webkitpy/generate_xcfilelists_lib/application.py:
  • Scripts/webkitpy/generate_xcfilelists_lib/generators.py:
  • Scripts/webkitpy/layout_tests/controllers/manager.py:
  • Scripts/webkitpy/layout_tests/controllers/single_test_runner.py:
  • Scripts/webkitpy/layout_tests/servers/apache_http_server.py:
  • Scripts/webkitpy/layout_tests/servers/http_server.py:
  • Scripts/webkitpy/layout_tests/views/buildbot_results.py:
  • Scripts/webkitpy/layout_tests/views/metered_stream.py:
  • Scripts/webkitpy/performance_tests/perftest.py:
  • Scripts/webkitpy/port/device_port.py:
  • Scripts/webkitpy/port/factory.py:
  • Scripts/webkitpy/port/leakdetector_valgrind.py:
  • Scripts/webkitpy/port/server_process.py:
  • Scripts/webkitpy/style/checkers/js.py:
  • Scripts/webkitpy/tool/bot/layouttestresultsreader.py:
  • Scripts/webkitpy/tool/bot/patchanalysistask.py:
  • Scripts/webkitpy/tool/bot/queueengine.py:
  • Scripts/webkitpy/tool/commands/download.py:
  • Scripts/webkitpy/tool/commands/earlywarningsystem.py:
  • Scripts/webkitpy/tool/commands/queues.py:
  • Scripts/webkitpy/tool/commands/suggestnominations.py:
  • Scripts/webkitpy/tool/commands/upload.py:
  • Scripts/webkitpy/tool/multicommandtool.py:
  • Scripts/webkitpy/tool/servers/rebaselineserver.py:
  • Scripts/webkitpy/tool/steps/commit.py:
  • Scripts/webkitpy/tool/steps/confirmdiff.py:
  • Scripts/webkitpy/tool/steps/haslanded.py:
  • Scripts/webkitpy/tool/steps/preparechangelog.py:
  • Scripts/webkitpy/tool/steps/promptforbugortitle.py:
  • Scripts/webkitpy/tool/steps/sortxcodeprojectfiles.py:
  • Scripts/webkitpy/tool/steps/suggestreviewers_unittest.py:
  • Scripts/webkitpy/w3c/test_exporter.py:
  • Scripts/webkitpy/xcode/simulated_device.py:
Location:
trunk/Tools
Files:
50 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r271154 r271158  
     12021-01-05  Alexey Proskuryakov  <ap@apple.com>
     2
     3        Remove some unused variables from webkitpy
     4        https://bugs.webkit.org/show_bug.cgi?id=220180
     5
     6        Reviewed by Aakash Jain, Sam Weinig and Jonathan Bedard.
     7
     8        * Scripts/webkitpy/benchmark_runner/webdriver_benchmark_runner.py:
     9        * Scripts/webkitpy/benchmark_runner/webserver_benchmark_runner.py:
     10        * Scripts/webkitpy/codegen/main.py:
     11        * Scripts/webkitpy/common/checkout/changelog.py:
     12        * Scripts/webkitpy/common/checkout/checkout.py:
     13        * Scripts/webkitpy/common/checkout/scm/git.py:
     14        * Scripts/webkitpy/common/checkout/scm/svn.py:
     15        * Scripts/webkitpy/common/config/committers.py:
     16        * Scripts/webkitpy/common/config/contributionareas.py:
     17        * Scripts/webkitpy/common/message_pool.py:
     18        * Scripts/webkitpy/common/net/buildbot/buildbot.py:
     19        * Scripts/webkitpy/common/net/credentials.py:
     20        * Scripts/webkitpy/common/system/crashlogs.py:
     21        * Scripts/webkitpy/common/system/executive.py:
     22        * Scripts/webkitpy/common/system/profiler.py:
     23        * Scripts/webkitpy/common/system/user.py:
     24        * Scripts/webkitpy/generate_xcfilelists_lib/application.py:
     25        * Scripts/webkitpy/generate_xcfilelists_lib/generators.py:
     26        * Scripts/webkitpy/layout_tests/controllers/manager.py:
     27        * Scripts/webkitpy/layout_tests/controllers/single_test_runner.py:
     28        * Scripts/webkitpy/layout_tests/servers/apache_http_server.py:
     29        * Scripts/webkitpy/layout_tests/servers/http_server.py:
     30        * Scripts/webkitpy/layout_tests/views/buildbot_results.py:
     31        * Scripts/webkitpy/layout_tests/views/metered_stream.py:
     32        * Scripts/webkitpy/performance_tests/perftest.py:
     33        * Scripts/webkitpy/port/device_port.py:
     34        * Scripts/webkitpy/port/factory.py:
     35        * Scripts/webkitpy/port/leakdetector_valgrind.py:
     36        * Scripts/webkitpy/port/server_process.py:
     37        * Scripts/webkitpy/style/checkers/js.py:
     38        * Scripts/webkitpy/tool/bot/layouttestresultsreader.py:
     39        * Scripts/webkitpy/tool/bot/patchanalysistask.py:
     40        * Scripts/webkitpy/tool/bot/queueengine.py:
     41        * Scripts/webkitpy/tool/commands/download.py:
     42        * Scripts/webkitpy/tool/commands/earlywarningsystem.py:
     43        * Scripts/webkitpy/tool/commands/queues.py:
     44        * Scripts/webkitpy/tool/commands/suggestnominations.py:
     45        * Scripts/webkitpy/tool/commands/upload.py:
     46        * Scripts/webkitpy/tool/multicommandtool.py:
     47        * Scripts/webkitpy/tool/servers/rebaselineserver.py:
     48        * Scripts/webkitpy/tool/steps/commit.py:
     49        * Scripts/webkitpy/tool/steps/confirmdiff.py:
     50        * Scripts/webkitpy/tool/steps/haslanded.py:
     51        * Scripts/webkitpy/tool/steps/preparechangelog.py:
     52        * Scripts/webkitpy/tool/steps/promptforbugortitle.py:
     53        * Scripts/webkitpy/tool/steps/sortxcodeprojectfiles.py:
     54        * Scripts/webkitpy/tool/steps/suggestreviewers_unittest.py:
     55        * Scripts/webkitpy/w3c/test_exporter.py:
     56        * Scripts/webkitpy/xcode/simulated_device.py:
     57
    1582021-01-05  Sihui Liu  <sihui_liu@appe.com>
    259
  • trunk/Tools/Scripts/webkitpy/benchmark_runner/webdriver_benchmark_runner.py

    r265866 r271158  
    1919    def _run_one_test(self, web_root, test_file):
    2020        from selenium.webdriver.support.ui import WebDriverWait
    21         result = None
    2221        try:
    2322            url = 'file://{root}/{plan_name}/{test_file}'.format(root=web_root, plan_name=self._plan_name, test_file=test_file)
  • trunk/Tools/Scripts/webkitpy/benchmark_runner/webserver_benchmark_runner.py

    r266277 r271158  
    3232
    3333    def _run_one_test(self, web_root, test_file):
    34         result = None
    3534        try:
    3635            self._http_server_driver.serve(web_root)
  • trunk/Tools/Scripts/webkitpy/codegen/main.py

    r225733 r271158  
    102102        return self.generate_from_js_builtins(test_files, work_directory, framework_name=framework_name, combined_outputs=combined_outputs)
    103103
    104     def wrappers_builtin_test(self, test_name, test_files, work_directory):
     104    def wrappers_builtin_test(self, test_files, work_directory):
    105105        return self.generate_from_js_builtins(test_files, work_directory, framework_name="WebCore", generate_wrappers=True)
    106106
  • trunk/Tools/Scripts/webkitpy/common/checkout/changelog.py

    r265077 r271158  
    322322        try:
    323323            return next(cls.parse_entries_from_file(changelog_file))
    324         except StopIteration as e:
     324        except StopIteration:
    325325            return None
    326326
  • trunk/Tools/Scripts/webkitpy/common/checkout/checkout.py

    r264949 r271158  
    156156        try:
    157157            return parse_bug_id_from_changelog(self.commit_message_for_this_commit(git_commit, changed_files).message())
    158         except ScriptError as e:
     158        except ScriptError:
    159159            pass  # We might not have ChangeLogs.
    160160
  • trunk/Tools/Scripts/webkitpy/common/checkout/scm/git.py

    r265778 r271158  
    114114            executive = executive or Executive()
    115115            return executive.run_command([cls.executable_name, 'rev-parse', '--is-inside-work-tree'], cwd=path, ignore_errors=True).rstrip() == "true"
    116         except OSError as e:
     116        except OSError:
    117117            # The Windows bots seem to through a WindowsError when git isn't installed.
    118118            return False
     
    123123            executive = executive or Executive()
    124124            return executive.run_command([cls.executable_name, 'clone', '-v', url, directory], ignore_errors=True)
    125         except OSError as e:
     125        except OSError:
    126126            return False
    127127
     
    387387        try:
    388388            return int(string)
    389         except ValueError as e:
     389        except ValueError:
    390390            return None
    391391
  • trunk/Tools/Scripts/webkitpy/common/checkout/scm/svn.py

    r266267 r271158  
    103103            exit_code = executive.run_command(svn_info_args, cwd=path, return_exit_code=True)
    104104            return (exit_code == 0)
    105         except OSError as e:
     105        except OSError:
    106106            return False
    107107
     
    249249        try:
    250250            log_output = self._run_svn(log_command, cwd=self.checkout_root)
    251         except ScriptError as e:
     251        except ScriptError:
    252252            return []
    253253        for line in log_output.splitlines():
  • trunk/Tools/Scripts/webkitpy/common/config/committers.py

    r264949 r271158  
    214214
    215215        for name, data in contributors.items():
    216             contributor = None
    217216            status = data.get('status')
    218217            if status == "reviewer":
  • trunk/Tools/Scripts/webkitpy/common/config/contributionareas.py

    r246790 r271158  
    202202        for file_path in touched_files:
    203203            split_file_path = self._split_path(file_path)
    204             tokenized_file_path = None
    205204            tokenized_file_path = sum([self._split_camelcase(token, lambda x: x.lower()) for token in split_file_path], [])
    206205            for area in self._contribution_areas:
  • trunk/Tools/Scripts/webkitpy/common/message_pool.py

    r254340 r271158  
    269269
    270270        worker = self._worker
    271         exception_msg = ""
    272271        _log.debug("%s starting" % self.name)
    273272
     
    287286        except queue.Empty:
    288287            assert False, '%s: ran out of messages in worker queue.' % self.name
    289         except KeyboardInterrupt as e:
     288        except KeyboardInterrupt:
    290289            self._raise(sys.exc_info())
    291         except Exception as e:
     290        except Exception:
    292291            self._raise(sys.exc_info())
    293292        finally:
  • trunk/Tools/Scripts/webkitpy/common/net/buildbot/buildbot.py

    r268925 r271158  
    138138            try:
    139139                return form.find_control("username")
    140             except Exception as e:
     140            except Exception:
    141141                return False
    142142
     
    437437    def failure_map(self):
    438438        failure_map = FailureMap()
    439         revision_to_failing_bots = {}
    440439        for builder_status in self.builder_statuses():
    441440            if builder_status["is_green"]:
  • trunk/Tools/Scripts/webkitpy/common/net/credentials.py

    r268673 r271158  
    6060            return (Git.read_git_config(self.git_prefix + "username"),
    6161                    Git.read_git_config(self.git_prefix + "password"))
    62         except OSError as e:
     62        except OSError:
    6363            # Catch and ignore OSError exceptions such as "no such file
    6464            # or directory" (OSError errno 2), which imply that the Git
  • trunk/Tools/Scripts/webkitpy/common/system/crashlogs.py

    r264949 r271158  
    5454            return self._find_newest_log_darwin(process_name, pid, include_errors, newer_than)
    5555        elif self._host.platform.is_win():
    56             return self._find_newest_log_win(process_name, pid, include_errors, newer_than)
     56            return self._find_newest_log_win(pid, include_errors, newer_than)
    5757        return None
    5858
     
    101101        return None
    102102
    103     def _find_newest_log_win(self, process_name, pid, include_errors, newer_than):
     103    def _find_newest_log_win(self, pid, include_errors, newer_than):
    104104        def is_crash_log(fs, dirpath, basename):
    105105            if self._crash_logs_to_skip and fs.join(dirpath, basename) in self._crash_logs_to_skip:
  • trunk/Tools/Scripts/webkitpy/common/system/executive.py

    r264949 r271158  
    298298                        running_pids.append(int(pid))
    299299                        self.pid_to_system_pid[int(pid)] = int(winpid)
    300                 except ValueError as e:
     300                except ValueError:
    301301                    pass
    302302        else:
     
    310310                        if process_name_filter(string_utils.decode(process_name, target_type=str)):
    311311                            running_pids.append(int(pid))
    312                     except ValueError as e:
     312                    except ValueError:
    313313                        pass
    314314
  • trunk/Tools/Scripts/webkitpy/common/system/profiler.py

    r255243 r271158  
    7171    name = None
    7272
    73     def __init__(self, host, executable_path, output_dir, identifier=None):
     73    def __init__(self, host, executable_path, output_dir):
    7474        self._host = host
    7575        self._executable_path = executable_path
     
    9393class SingleFileOutputProfiler(Profiler):
    9494    def __init__(self, host, executable_path, output_dir, output_suffix, identifier=None):
    95         super(SingleFileOutputProfiler, self).__init__(host, executable_path, output_dir, identifier)
     95        super(SingleFileOutputProfiler, self).__init__(host, executable_path, output_dir)
    9696        # FIXME: Currently all reports are kept as test.*, until we fix that, search up to 1000 names before giving up.
    9797        self._output_path = self._host.workspace.find_unused_filename(self._output_dir, self._identifier, output_suffix, search_limit=1000)
  • trunk/Tools/Scripts/webkitpy/common/system/user.py

    r250375 r271158  
    108108                        else:
    109109                            indices.append(int(value) - 1)
    110                 except ValueError as err:
     110                except ValueError:
    111111                    continue
    112112
     
    115115                try:
    116116                    result = int(cls.prompt("Enter a number: ", raw_input=raw_input)) - 1
    117                 except ValueError as err:
     117                except ValueError:
    118118                    continue
    119119                return list_items[result]
     
    159159            child_process = subprocess.Popen([pager], stdin=subprocess.PIPE)
    160160            child_process.communicate(input=message)
    161         except IOError as e:
     161        except IOError:
    162162            pass
    163163
     
    175175            webbrowser.get()
    176176            return True
    177         except webbrowser.Error as e:
     177        except webbrowser.Error:
    178178            return False
    179179
  • trunk/Tools/Scripts/webkitpy/generate_xcfilelists_lib/application.py

    r248106 r271158  
    121121            try:
    122122                func = self.dispatch[args.command]
    123             except KeyError as e:
     123            except KeyError:
    124124                raise util.InvalidCommandError(args.command)
    125125
     
    140140            raise
    141141
    142         except BaseException as e:
     142        except BaseException:
    143143            traceback.print_exc()
    144144            return os.EX_SOFTWARE
     
    330330            try:
    331331                generators = core_operation(generator, generators)
    332             except BaseException as e:
     332            except BaseException:
    333333                # TODO: Turn the traceback into a string, and then allow
    334334                # this field to be pickled and printed by the calling
  • trunk/Tools/Scripts/webkitpy/generate_xcfilelists_lib/generators.py

    r269063 r271158  
    147147                    generator.application = self.application
    148148                    generators.append(generator)
    149                 except EOFError as e:
     149                except EOFError:
    150150                    break
    151151            return generators
  • trunk/Tools/Scripts/webkitpy/layout_tests/controllers/manager.py

    r268925 r271158  
    615615                try:
    616616                    response_json = json.loads(response_text)
    617                 except ValueError as error:
     617                except ValueError:
    618618                    _log.error("JSON upload failed; failed to parse the response: %s", response_text)
    619619                    continue
  • trunk/Tools/Scripts/webkitpy/layout_tests/controllers/single_test_runner.py

    r270953 r271158  
    195195        """
    196196        failures = []
    197         fs = self._filesystem
    198197        if driver_output.timeout:
    199198            failures.append(test_failures.FailureTimeout(bool(reference_filename)))
  • trunk/Tools/Scripts/webkitpy/layout_tests/servers/apache_http_server.py

    r252475 r271158  
    9191        # FIXME: We shouldn't be calling a protected method of _port_obj!
    9292        executable = self._port_obj._path_to_apache()
    93         config_file_path = self._copy_apache_config_file(self.tests_dir, output_dir)
     93        config_file_path = self._copy_apache_config_file(output_dir)
    9494
    9595        start_cmd = [executable,
     
    153153        self._stop_cmd = stop_cmd
    154154
    155     def _copy_apache_config_file(self, test_dir, output_dir):
     155    def _copy_apache_config_file(self, output_dir):
    156156        """Copy apache config file and returns the path to use.
    157157        Args:
    158           test_dir: absolute path to the LayoutTests directory.
    159158          output_dir: absolute path to the layout test results directory.
    160159        """
  • trunk/Tools/Scripts/webkitpy/layout_tests/servers/http_server.py

    r252475 r271158  
    4242class Lighttpd(http_server_base.HttpServerBase):
    4343
    44     def __init__(self, port_obj, output_dir, background=False, port=None,
     44    def __init__(self, port_obj, output_dir, port=None,
    4545                 root=None, run_background=None, additional_dirs=None,
    4646                 layout_tests_dir=None):
     
    195195            try:
    196196                self._remove_log_files(self._output_dir, log_prefix)
    197             except OSError as e:
     197            except OSError:
    198198                _log.warning('Failed to remove old %s %s files' % (self._name, log_prefix))
    199199
  • trunk/Tools/Scripts/webkitpy/layout_tests/views/buildbot_results.py

    r269120 r271158  
    148148                    actual = result['actual'].split(" ")
    149149                    expected = result['expected'].split(" ")
    150                     result = TestExpectations.EXPECTATIONS[key.lower()]
    151150                    # FIXME: clean this up once the old syntax is gone
    152151                    new_expectations_list = [TestExpectationParser._inverted_expectation_tokens[exp] for exp in list(set(actual) | set(expected))]
  • trunk/Tools/Scripts/webkitpy/layout_tests/views/metered_stream.py

    r254340 r271158  
    125125
    126126    def _erase_last_partial_line(self):
    127         num_chars = len(self._last_partial_line)
    128127        self._stream.write(self._erasure(self._last_partial_line))
    129128        self._last_partial_line = ''
  • trunk/Tools/Scripts/webkitpy/performance_tests/perftest.py

    r260053 r271158  
    186186            return False
    187187
    188         current_metric = None
    189188        for line in re.split('\n', output.text):
    190189            description_match = self._description_regex.match(line)
  • trunk/Tools/Scripts/webkitpy/port/device_port.py

    r269990 r271158  
    251251
    252252        version = self.device_version()
    253         version_name = None
    254253        for table in [INTERNAL_TABLE, PUBLIC_TABLE]:
    255254            version_name = VersionNameMap.map(self.host.platform).to_name(version, platform=device_type.software_variant.lower(), table=table)
  • trunk/Tools/Scripts/webkitpy/port/factory.py

    r263610 r271158  
    128128        self._host = host
    129129
    130     def _default_port(self, options):
     130    def _default_port(self):
    131131        platform = self._host.platform
    132132        if platform.is_linux() or platform.is_freebsd():
     
    142142        port_name is None, this routine attempts to guess at the most
    143143        appropriate port on this platform."""
    144         port_name = port_name or self._default_port(options)
     144        port_name = port_name or self._default_port()
    145145
    146146        classes = []
  • trunk/Tools/Scripts/webkitpy/port/leakdetector_valgrind.py

    r264949 r271158  
    110110                self._backtraces.append([description, frames])
    111111                description = None
    112                 stack = None
    113                 frames = None
    114112            elif description and node.localName != None:
    115113                # The lastest description has no stack, e.g. "Address 0x28 is unknown".
     
    223221            parsed_string = parseString(leaks_output)
    224222        except ExpatError as e:
    225             parse_failed = True
    226223            _log.error("could not parse %s: %s" % (string_utils.decode(leaks_output, target_type=str), e))
    227224            return
  • trunk/Tools/Scripts/webkitpy/port/server_process.py

    r264949 r271158  
    187187            self._proc.stdin.write(string_utils.encode(bytes))
    188188            self._proc.stdin.flush()
    189         except (IOError, ValueError) as e:
     189        except (IOError, ValueError):
    190190            self.stop(0.0)
    191191            # stop() calls _reset(), so we have to set crashed to True after calling stop()
     
    315315                    self._crashed = True
    316316                self._error += data
    317         except IOError as e:
     317        except IOError:
    318318            # We can ignore the IOErrors because we will detect if the subporcess crashed
    319319            # the next time through the loop in _read()
  • trunk/Tools/Scripts/webkitpy/style/checkers/js.py

    r252440 r271158  
    5959
    6060    def check(self, lines):
    61         in_multiline_comment = False
    6261        line_number = 0
    6362        for line in lines:
     
    6665
    6766            if (line.endswith("*/")):
    68                 in_multiline_comment = False
    6967                continue
    7068
    7169            if (line.startswith("/*") or line.startswith("*")):
    72                 in_multiline_comment = True
    7370                continue
    7471
  • trunk/Tools/Scripts/webkitpy/tool/bot/layouttestresultsreader.py

    r225733 r271158  
    5050        try:
    5151            return self._host.filesystem.read_text_file(path)
    52         except IOError as e:  # File does not exist or can't be read.
     52        except IOError:  # File does not exist or can't be read.
    5353            return None
    5454
  • trunk/Tools/Scripts/webkitpy/tool/bot/patchanalysistask.py

    r263181 r271158  
    243243            return True
    244244        second_results = self._delegate.test_results()
    245         second_script_error = self._script_error
    246245        if second_results is None:
    247246            return False
  • trunk/Tools/Scripts/webkitpy/tool/bot/queueengine.py

    r261408 r271158  
    113113                    message = "Unexpected failure when processing patch!  Please file a bug against webkit-patch.\n%s" % e.message_with_output(output_limit=5000)
    114114                    self._delegate.handle_unexpected_error(work_item, message)
    115             except TerminateQueue as e:
     115            except TerminateQueue:
    116116                self._stopping("TerminateQueue exception received.")
    117117                return 0
    118             except KeyboardInterrupt as e:
     118            except KeyboardInterrupt:
    119119                self._stopping("User terminated queue.")
    120120                return 1
    121             except Exception as e:
     121            except Exception:
    122122                traceback.print_exc()
    123123                # Don't try tell the status bot, in case telling it causes an exception.
  • trunk/Tools/Scripts/webkitpy/tool/commands/download.py

    r259212 r271158  
    193193
    194194    def __init__(self):
    195         options = []
    196195        self._prepare_sequence = StepSequence(self.prepare_steps)
    197196        self._main_sequence = StepSequence(self.main_steps)
  • trunk/Tools/Scripts/webkitpy/tool/commands/earlywarningsystem.py

    r264949 r271158  
    9696            succeeded = task.run()
    9797            return succeeded
    98         except PatchIsNotValid as error:
     98        except PatchIsNotValid:
    9999            return False
    100         except UnableToApplyPatch as e:
     100        except UnableToApplyPatch:
    101101            return False
    102         except PatchIsNotApplicable as e:
     102        except PatchIsNotApplicable:
    103103            return False
    104104        except ScriptError as e:
  • trunk/Tools/Scripts/webkitpy/tool/commands/queues.py

    r264949 r271158  
    6363        try:
    6464            self._tool.bugs.add_cc_to_bug(bug_id, self.watchers)
    65         except Exception as e:
     65        except Exception:
    6666            traceback.print_exc()
    6767            _log.error("Failed to CC watchers.")
  • trunk/Tools/Scripts/webkitpy/tool/commands/suggestnominations.py

    r265077 r271158  
    214214            try:
    215215                self._count_commit(self._parse_commit_message(commit_message), analysis)
    216             except CommitLogError as exception:
     216            except CommitLogError:
    217217                continue
    218218        return analysis['counters_by_email']
     
    264264            if author_email != counter['latest_email']:
    265265                continue
    266             contributor = self._committer_list.contributor_by_email(author_email)
    267266            author_name = counter['latest_name']
    268267            patch_count = counter['count']
  • trunk/Tools/Scripts/webkitpy/tool/commands/upload.py

    r237037 r271158  
    8282
    8383    def execute(self, options, args, tool):
    84         committers = CommitterList()
    8584        for bug_id in tool.bugs.queries.fetch_bug_ids_from_pending_commit_list():
    8685            bug = self._tool.bugs.fetch_bug(bug_id)
     
    478477        commit_id = commit_ids[0]
    479478
    480         bug_title = ""
    481         comment_text = ""
    482479        if options.prompt:
    483480            (bug_title, comment_text) = self.prompt_for_bug_title_and_comment()
     
    499496
    500497    def create_bug_from_patch(self, options, args, tool):
    501         bug_title = ""
    502         comment_text = ""
    503498        if options.prompt:
    504499            (bug_title, comment_text) = self.prompt_for_bug_title_and_comment()
     
    509504
    510505        diff = tool.scm().create_patch(options.git_commit)
    511         bug_id = tool.bugs.create_bug(bug_title, comment_text, options.component, diff, "Patch", cc=options.cc, mark_for_review=options.review, mark_for_commit_queue=options.request_commit)
     506        tool.bugs.create_bug(bug_title, comment_text, options.component, diff, "Patch", cc=options.cc, mark_for_review=options.review, mark_for_commit_queue=options.request_commit)
    512507
    513508    def prompt_for_bug_title_and_comment(self):
  • trunk/Tools/Scripts/webkitpy/tool/multicommandtool.py

    r253128 r271158  
    305305                result = command.check_arguments_and_execute(options, args, self)
    306306                break
    307             except TryAgain as e:
     307            except TryAgain:
    308308                pass
    309309
  • trunk/Tools/Scripts/webkitpy/tool/servers/rebaselineserver.py

    r253128 r271158  
    7272    scm = test_config.scm
    7373    layout_tests_directory = test_config.layout_tests_directory
    74     results_directory = test_config.results_directory
    7574    target_expectations_directory = filesystem.join(
    7675        layout_tests_directory, 'platform', baseline_target, test_directory)
     
    179178        def platform_from_directory(self, directory):
    180179            return self._platforms_by_directory[directory]
    181 
    182     test_path = test_config.filesystem.join(test_config.layout_tests_directory, test_file)
    183180
    184181    host = test_config.host
  • trunk/Tools/Scripts/webkitpy/tool/steps/commit.py

    r225733 r271158  
    6262        try:
    6363            self._tool.executive.run_and_throw_if_fail(self._tool.deprecated_port().check_webkit_style_command() + args, cwd=self._tool.scm().checkout_root)
    64         except ScriptError as e:
     64        except ScriptError:
    6565            if self._options.non_interactive:
    6666                raise
  • trunk/Tools/Scripts/webkitpy/tool/steps/confirmdiff.py

    r253128 r271158  
    6363            # file alive until the user has had a chance to confirm the diff.
    6464            return pretty_diff_file
    65         except ScriptError as e:
     65        except ScriptError:
    6666            _log.warning("PrettyPatch failed.  :(")
    67         except OSError as e:
     67        except OSError:
    6868            _log.warning("PrettyPatch unavailable.")
    6969
  • trunk/Tools/Scripts/webkitpy/tool/steps/haslanded.py

    r264949 r271158  
    8282            return executive.run_command(
    8383                ["interdiff", diff1_patch.name, diff2_patch.name], decode_output=False)
    84         except ScriptError as e:
     84        except ScriptError:
    8585            _log.warning("Unable to find interdiff util (part of GNU difftools package) which is required.")
    8686            raise
  • trunk/Tools/Scripts/webkitpy/tool/steps/preparechangelog.py

    r264455 r271158  
    126126        try:
    127127            output = self._tool.executive.run_and_throw_if_fail(args, self._options.quiet, cwd=self._tool.scm().checkout_root)
    128         except ScriptError as e:
     128        except ScriptError:
    129129            _log.error("Unable to prepare ChangeLogs.")
    130130            sys.exit(1)
  • trunk/Tools/Scripts/webkitpy/tool/steps/promptforbugortitle.py

    r253128 r271158  
    5555        try:
    5656            state["bug_id"] = int(user_response)
    57         except ValueError as TypeError:
     57        except ValueError:
    5858            parsed_url = None
    5959            try:
  • trunk/Tools/Scripts/webkitpy/tool/steps/sortxcodeprojectfiles.py

    r225733 r271158  
    5454                    output = self._tool.executive.run_and_throw_if_fail(args, self._options.quiet, cwd=self._tool.scm().checkout_root)
    5555                    self.did_modify_checkout(state)
    56                 except ScriptError as e:
     56                except ScriptError:
    5757                    _log.error("Unable to sort modified xcode projects.")
    5858                    sys.exit(1)
  • trunk/Tools/Scripts/webkitpy/tool/steps/suggestreviewers_unittest.py

    r265883 r271158  
    4646
    4747    def test_basic(self):
    48         capture = OutputCapture()
    4948        step = SuggestReviewers(MockTool(), MockOptions(suggest_reviewers=True, git_commit=None))
    5049        with OutputCapture(level=logging.INFO) as captured:
  • trunk/Tools/Scripts/webkitpy/w3c/test_exporter.py

    r265750 r271158  
    240240        try:
    241241            response = self._host.web.request(method='GET', url=url, data=None, headers=headers)
    242         except HTTPError as e:
     242        except HTTPError:
    243243            raise Exception("OAuth token is not valid")
    244244        data = json.load(response)
     
    255255
    256256    def _ensure_wpt_repository(self, url, wpt_repository_directory, gitClass):
    257         git = None
    258257        if not self._filesystem.exists(wpt_repository_directory):
    259258            _log.info('Cloning %s into %s...' % (url, wpt_repository_directory))
  • trunk/Tools/Scripts/webkitpy/xcode/simulated_device.py

    r268460 r271158  
    638638            _log.debug(error.message_with_output())
    639639
    640         output = None
    641 
    642640        with Timeout(timeout, handler=RuntimeError(u'Timed out waiting for process to open {} on {}'.format(bundle_id, self.udid)), patch=False):
    643641            while True:
Note: See TracChangeset for help on using the changeset viewer.