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

Side by Side Diff: client/run_isolated.py

Issue 2931913002: Fix wording changed in 70b369823ed763667b. (Closed)
Patch Set: Created 3 years, 6 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright 2012 The LUCI Authors. All rights reserved. 2 # Copyright 2012 The LUCI Authors. All rights reserved.
3 # Use of this source code is governed under the Apache License, Version 2.0 3 # Use of this source code is governed under the Apache License, Version 2.0
4 # that can be found in the LICENSE file. 4 # that can be found in the LICENSE file.
5 5
6 """Runs a command with optional isolated input/output. 6 """Runs a command with optional isolated input/output.
7 7
8 Despite name "run_isolated", can run a generic non-isolated command specified as 8 Despite name "run_isolated", can run a generic non-isolated command specified as
9 args. 9 args.
10 10
(...skipping 574 matching lines...) Expand 10 before | Expand all | Expand 10 after
585 sys.stderr.write(OUTLIVING_ZOMBIE_MSG % ('run', grace_period)) 585 sys.stderr.write(OUTLIVING_ZOMBIE_MSG % ('run', grace_period))
586 if result['exit_code'] == 0: 586 if result['exit_code'] == 0:
587 result['exit_code'] = 1 587 result['exit_code'] = 1
588 if fs.isdir(tmp_dir): 588 if fs.isdir(tmp_dir):
589 try: 589 try:
590 success = file_path.rmtree(tmp_dir) 590 success = file_path.rmtree(tmp_dir)
591 except OSError as e: 591 except OSError as e:
592 logging.error('Failure with %s', e) 592 logging.error('Failure with %s', e)
593 success = False 593 success = False
594 if not success: 594 if not success:
595 sys.stderr.write(OUTLIVING_ZOMBIE_MSG % ('run', grace_period)) 595 sys.stderr.write(OUTLIVING_ZOMBIE_MSG % ('temp', grace_period))
596 if result['exit_code'] == 0: 596 if result['exit_code'] == 0:
597 result['exit_code'] = 1 597 result['exit_code'] = 1
598 598
599 # This deletes out_dir if leak_temp_dir is not set. 599 # This deletes out_dir if leak_temp_dir is not set.
600 if out_dir: 600 if out_dir:
601 isolated_stats = result['stats'].setdefault('isolated', {}) 601 isolated_stats = result['stats'].setdefault('isolated', {})
602 result['outputs_ref'], success, isolated_stats['upload'] = ( 602 result['outputs_ref'], success, isolated_stats['upload'] = (
603 delete_and_upload(storage, out_dir, leak_temp_dir)) 603 delete_and_upload(storage, out_dir, leak_temp_dir))
604 if not success and result['exit_code'] == 0: 604 if not success and result['exit_code'] == 0:
605 result['exit_code'] = 1 605 result['exit_code'] = 1
(...skipping 489 matching lines...) Expand 10 before | Expand all | Expand 10 after
1095 return 1 1095 return 1
1096 1096
1097 1097
1098 if __name__ == '__main__': 1098 if __name__ == '__main__':
1099 subprocess42.inhibit_os_error_reporting() 1099 subprocess42.inhibit_os_error_reporting()
1100 # Ensure that we are always running with the correct encoding. 1100 # Ensure that we are always running with the correct encoding.
1101 fix_encoding.fix_encoding() 1101 fix_encoding.fix_encoding()
1102 file_path.enable_symlink() 1102 file_path.enable_symlink()
1103 1103
1104 sys.exit(main(sys.argv[1:])) 1104 sys.exit(main(sys.argv[1:]))
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698