| OLD | NEW |
| 1 # Copyright 2009 Google Inc. Released under the GPL v2 | 1 # Copyright 2009 Google Inc. Released under the GPL v2 |
| 2 | 2 |
| 3 """ | 3 """ |
| 4 This file contains the implementation of a host object for the local machine. | 4 This file contains the implementation of a host object for the local machine. |
| 5 """ | 5 """ |
| 6 | 6 |
| 7 import glob, httplib, logging, os, platform, socket, urlparse | 7 import glob, os, platform |
| 8 from autotest_lib.client.common_lib import hosts, error |
| 8 from autotest_lib.client.bin import utils | 9 from autotest_lib.client.bin import utils |
| 9 from autotest_lib.client.common_lib import error, hosts | |
| 10 from autotest_lib.client.common_lib.cros import autoupdater | 10 from autotest_lib.client.common_lib.cros import autoupdater |
| 11 | 11 |
| 12 | 12 |
| 13 class LocalHost(hosts.Host): | 13 class LocalHost(hosts.Host): |
| 14 def _initialize(self, hostname=None, bootloader=None, *args, **dargs): | 14 def _initialize(self, hostname=None, bootloader=None, *args, **dargs): |
| 15 super(LocalHost, self)._initialize(*args, **dargs) | 15 super(LocalHost, self)._initialize(*args, **dargs) |
| 16 | 16 |
| 17 # hostname will be an actual hostname when this client was created | 17 # hostname will be an actual hostname when this client was created |
| 18 # by an autoserv process | 18 # by an autoserv process |
| 19 if not hostname: | 19 if not hostname: |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 if not os.path.exists(path): | 83 if not os.path.exists(path): |
| 84 continue | 84 continue |
| 85 closure.add(path) | 85 closure.add(path) |
| 86 if os.path.islink(path): | 86 if os.path.islink(path): |
| 87 link_to = os.path.join(os.path.dirname(path), | 87 link_to = os.path.join(os.path.dirname(path), |
| 88 os.readlink(path)) | 88 os.readlink(path)) |
| 89 if link_to not in closure: | 89 if link_to not in closure: |
| 90 paths.add(link_to) | 90 paths.add(link_to) |
| 91 | 91 |
| 92 return closure | 92 return closure |
| OLD | NEW |