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

Side by Side Diff: client/utils/tools.py

Issue 1932143003: run_isolated: support non-isolated commands (Closed) Base URL: https://chromium.googlesource.com/external/github.com/luci/luci-py@run-isolated-download-stats
Patch Set: rebased Created 4 years, 7 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
« client/run_isolated.py ('K') | « client/tests/run_isolated_test.py ('k') | 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 # Copyright 2013 The LUCI Authors. All rights reserved. 1 # Copyright 2013 The LUCI Authors. All rights reserved.
2 # Use of this source code is governed by the Apache v2.0 license that can be 2 # Use of this source code is governed by the Apache v2.0 license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 """Various utility functions and classes not specific to any single area.""" 5 """Various utility functions and classes not specific to any single area."""
6 6
7 import atexit 7 import atexit
8 import contextlib
8 import cStringIO 9 import cStringIO
9 import functools 10 import functools
10 import json 11 import json
11 import logging 12 import logging
12 import os 13 import os
13 import re 14 import re
14 import sys 15 import sys
15 import threading 16 import threading
16 import time 17 import time
17 18
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 a zip archive, we need to extract the file first. 310 a zip archive, we need to extract the file first.
310 """ 311 """
311 global _ca_certs 312 global _ca_certs
312 with _ca_certs_lock: 313 with _ca_certs_lock:
313 if _ca_certs is not None and os.path.exists(_ca_certs): 314 if _ca_certs is not None and os.path.exists(_ca_certs):
314 return _ca_certs 315 return _ca_certs
315 # Some rogue process clears /tmp and causes cacert.pem to disappear. Extract 316 # Some rogue process clears /tmp and causes cacert.pem to disappear. Extract
316 # to current directory instead. We use our own bundled copy of cacert.pem. 317 # to current directory instead. We use our own bundled copy of cacert.pem.
317 _ca_certs = zip_package.extract_resource(utils, 'cacert.pem', temp_dir='.') 318 _ca_certs = zip_package.extract_resource(utils, 'cacert.pem', temp_dir='.')
318 return _ca_certs 319 return _ca_certs
320
321
322 @contextlib.contextmanager
323 def noop_context():
324 """A noop context, can be used with `with` keyword."""
325 yield
OLDNEW
« client/run_isolated.py ('K') | « client/tests/run_isolated_test.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698