Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(10)

Side by Side Diff: third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/abstractsequencedcommand.py

Issue 1839193004: Run auto-formatter (autopep8) on webkitpy. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 # Copyright (C) 2010 Google Inc. All rights reserved. 1 # Copyright (C) 2010 Google Inc. All rights reserved.
2 # 2 #
3 # Redistribution and use in source and binary forms, with or without 3 # Redistribution and use in source and binary forms, with or without
4 # modification, are permitted provided that the following conditions are 4 # modification, are permitted provided that the following conditions are
5 # met: 5 # met:
6 # 6 #
7 # * Redistributions of source code must retain the above copyright 7 # * Redistributions of source code must retain the above copyright
8 # notice, this list of conditions and the following disclaimer. 8 # notice, this list of conditions and the following disclaimer.
9 # * Redistributions in binary form must reproduce the above 9 # * Redistributions in binary form must reproduce the above
10 # copyright notice, this list of conditions and the following disclaimer 10 # copyright notice, this list of conditions and the following disclaimer
(...skipping 19 matching lines...) Expand all
30 30
31 from webkitpy.common.system.executive import ScriptError 31 from webkitpy.common.system.executive import ScriptError
32 from webkitpy.tool.commands.stepsequence import StepSequence 32 from webkitpy.tool.commands.stepsequence import StepSequence
33 from webkitpy.tool.multicommandtool import AbstractDeclarativeCommand 33 from webkitpy.tool.multicommandtool import AbstractDeclarativeCommand
34 34
35 _log = logging.getLogger(__name__) 35 _log = logging.getLogger(__name__)
36 36
37 37
38 class AbstractSequencedCommand(AbstractDeclarativeCommand): 38 class AbstractSequencedCommand(AbstractDeclarativeCommand):
39 steps = None 39 steps = None
40
40 def __init__(self): 41 def __init__(self):
41 self._sequence = StepSequence(self.steps) 42 self._sequence = StepSequence(self.steps)
42 AbstractDeclarativeCommand.__init__(self, self._sequence.options()) 43 AbstractDeclarativeCommand.__init__(self, self._sequence.options())
43 44
44 def _prepare_state(self, options, args, tool): 45 def _prepare_state(self, options, args, tool):
45 return None 46 return None
46 47
47 def execute(self, options, args, tool): 48 def execute(self, options, args, tool):
48 try: 49 try:
49 state = self._prepare_state(options, args, tool) 50 state = self._prepare_state(options, args, tool)
50 except ScriptError, e: 51 except ScriptError, e:
51 _log.error(e.message_with_output()) 52 _log.error(e.message_with_output())
52 self._exit(e.exit_code or 2) 53 self._exit(e.exit_code or 2)
53 54
54 self._sequence.run_and_handle_errors(tool, options, state) 55 self._sequence.run_and_handle_errors(tool, options, state)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698