| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright 2013 the V8 project authors. All rights reserved. | 2 # Copyright 2013 the V8 project authors. All rights reserved. |
| 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 | 10 # copyright notice, this list of conditions and the following |
| (...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 237 print data | 237 print data |
| 238 print "ERROR: Could not read response. Is your key valid?" | 238 print "ERROR: Could not read response. Is your key valid?" |
| 239 raise | 239 raise |
| 240 | 240 |
| 241 def Sleep(self, seconds): | 241 def Sleep(self, seconds): |
| 242 time.sleep(seconds) | 242 time.sleep(seconds) |
| 243 | 243 |
| 244 def GetDate(self): | 244 def GetDate(self): |
| 245 return datetime.date.today().strftime("%Y-%m-%d") | 245 return datetime.date.today().strftime("%Y-%m-%d") |
| 246 | 246 |
| 247 def GetUTCStamp(self): |
| 248 time.mktime(datetime.datetime.utcnow().timetuple()) |
| 249 |
| 247 DEFAULT_SIDE_EFFECT_HANDLER = SideEffectHandler() | 250 DEFAULT_SIDE_EFFECT_HANDLER = SideEffectHandler() |
| 248 | 251 |
| 249 | 252 |
| 250 class NoRetryException(Exception): | 253 class NoRetryException(Exception): |
| 251 pass | 254 pass |
| 252 | 255 |
| 253 | 256 |
| 254 class Step(GitRecipesMixin): | 257 class Step(GitRecipesMixin): |
| 255 def __init__(self, text, requires, number, config, state, options, handler): | 258 def __init__(self, text, requires, number, config, state, options, handler): |
| 256 self._text = text | 259 self._text = text |
| (...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 647 for (number, step_class) in enumerate(step_classes): | 650 for (number, step_class) in enumerate(step_classes): |
| 648 steps.append(MakeStep(step_class, number, self._state, self._config, | 651 steps.append(MakeStep(step_class, number, self._state, self._config, |
| 649 options, self._side_effect_handler)) | 652 options, self._side_effect_handler)) |
| 650 for step in steps[options.step:]: | 653 for step in steps[options.step:]: |
| 651 if step.Run(): | 654 if step.Run(): |
| 652 return 1 | 655 return 1 |
| 653 return 0 | 656 return 0 |
| 654 | 657 |
| 655 def Run(self, args=None): | 658 def Run(self, args=None): |
| 656 return self.RunSteps(self._Steps(), args) | 659 return self.RunSteps(self._Steps(), args) |
| OLD | NEW |