OLD | NEW |
1 # Copyright 2015 The Swarming Authors. All rights reserved. | 1 # Copyright 2015 The LUCI Authors. All rights reserved. |
2 # Use of this source code is governed under the Apache License, Version 2.0 that | 2 # Use of this source code is governed by the Apache v2.0 license that can be |
3 # can be found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 """Wraps os, os.path and shutil functions to work around MAX_PATH on Windows.""" | 5 """Wraps os, os.path and shutil functions to work around MAX_PATH on Windows.""" |
6 | 6 |
7 import __builtin__ | 7 import __builtin__ |
8 import inspect | 8 import inspect |
9 import os | 9 import os |
10 import shutil | 10 import shutil |
11 import sys | 11 import sys |
12 | 12 |
13 | 13 |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 for _fn in _os_fns: | 127 for _fn in _os_fns: |
128 if hasattr(os, _fn): | 128 if hasattr(os, _fn): |
129 sys.modules[__name__].__dict__.setdefault( | 129 sys.modules[__name__].__dict__.setdefault( |
130 _fn, _get_lambda(getattr(os, _fn))) | 130 _fn, _get_lambda(getattr(os, _fn))) |
131 | 131 |
132 | 132 |
133 for _fn in _os_path_fns: | 133 for _fn in _os_path_fns: |
134 if hasattr(os.path, _fn): | 134 if hasattr(os.path, _fn): |
135 sys.modules[__name__].__dict__.setdefault( | 135 sys.modules[__name__].__dict__.setdefault( |
136 _fn, _get_lambda(getattr(os.path, _fn))) | 136 _fn, _get_lambda(getattr(os.path, _fn))) |
OLD | NEW |