OLD | NEW |
1 # Copyright (c) 2011 Google Inc. All rights reserved. | 1 # Copyright (c) 2011 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 12 matching lines...) Expand all Loading... |
23 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 23 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
24 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 24 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
25 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 25 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
26 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 26 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
27 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 27 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
28 | 28 |
29 import os | 29 import os |
30 import platform | 30 import platform |
31 import sys | 31 import sys |
32 | 32 |
33 from webkitpy.common.system import environment, executive, file_lock, filesystem
, platforminfo, user, workspace | 33 from webkitpy.common.system import environment, executive, filesystem, platformi
nfo, user, workspace |
34 | 34 |
35 | 35 |
36 class SystemHost(object): | 36 class SystemHost(object): |
37 def __init__(self): | 37 def __init__(self): |
38 self.executive = executive.Executive() | 38 self.executive = executive.Executive() |
39 self.filesystem = filesystem.FileSystem() | 39 self.filesystem = filesystem.FileSystem() |
40 self.user = user.User() | 40 self.user = user.User() |
41 self.platform = platforminfo.PlatformInfo(sys, platform, self.executive) | 41 self.platform = platforminfo.PlatformInfo(sys, platform, self.executive) |
42 self.workspace = workspace.Workspace(self.filesystem, self.executive) | 42 self.workspace = workspace.Workspace(self.filesystem, self.executive) |
43 | 43 |
44 def copy_current_environment(self): | 44 def copy_current_environment(self): |
45 return environment.Environment(os.environ.copy()) | 45 return environment.Environment(os.environ.copy()) |
46 | |
47 def make_file_lock(self, path): | |
48 return file_lock.FileLock(path) | |
OLD | NEW |