OLD | NEW |
---|---|
1 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. | 1 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 import dbus, logging, os, shutil, socket, sys, time | 5 import dbus, logging, os, shutil, socket, sys, time |
6 from autotest_lib.client.bin import chromeos_constants | 6 from autotest_lib.client.bin import chromeos_constants |
7 from autotest_lib.client.bin import site_login, site_utils, test as bin_test | 7 from autotest_lib.client.bin import site_login, site_utils, test as bin_test |
8 from autotest_lib.client.common_lib import error, site_ui | 8 from autotest_lib.client.common_lib import error, site_ui |
9 from autotest_lib.client.common_lib import site_auth_server, site_dns_server | 9 from autotest_lib.client.common_lib import site_auth_server, site_dns_server |
10 from dbus.mainloop.glib import DBusGMainLoop | 10 from dbus.mainloop.glib import DBusGMainLoop |
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
251 logging.error(error) | 251 logging.error(error) |
252 | 252 |
253 if site_login.logged_in(): | 253 if site_login.logged_in(): |
254 try: | 254 try: |
255 shutil.copy(chromeos_constants.CRYPTOHOME_MOUNT_PT+'/chrome', | 255 shutil.copy(chromeos_constants.CRYPTOHOME_MOUNT_PT+'/chrome', |
256 self.resultsdir+'/chrome_postlogin_log') | 256 self.resultsdir+'/chrome_postlogin_log') |
257 except (IOError, OSError) as error: | 257 except (IOError, OSError) as error: |
258 logging.error(error) | 258 logging.error(error) |
259 self.logout() | 259 self.logout() |
260 | 260 |
261 if os.path.isfile(chromeos_constants.CRYPTOHOMED_LOG): | |
262 base = os.path.basename(chromeos_constants.CRYPTOHOMED_LOG) | |
truty1
2010/09/24 00:27:28
should this be in a try block with a logging error
| |
263 shutil.copy(chromeos_constants.CRYPTOHOMED_LOG, | |
264 os.path.join(self.resultsdir, base)) | |
265 | |
261 self.stop_authserver() | 266 self.stop_authserver() |
262 | 267 |
263 | 268 |
264 def get_auth_endpoint_misses(self): | 269 def get_auth_endpoint_misses(self): |
265 if hasattr(self, '_authServer'): | 270 if hasattr(self, '_authServer'): |
266 return self._authServer.get_endpoint_misses() | 271 return self._authServer.get_endpoint_misses() |
267 else: | 272 else: |
268 return {} | 273 return {} |
OLD | NEW |