KVM test: use the new LoginError and SCPError exceptions
[autotest-zwu.git] / scheduler / archive_results.py
blobd5e071b0d90e9e01eddb8af06bc350963b2f057c
1 #!/usr/bin/python
3 import common, logging
4 from autotest_lib.client.common_lib import global_config, utils
5 from autotest_lib.scheduler import drone_utility
7 class BaseResultsArchiver(object):
8 def archive_results(self, path):
9 results_host = global_config.global_config.get_config_value(
10 'SCHEDULER', 'results_host', default=None)
11 if not results_host or results_host == 'localhost':
12 return
14 if not path.endswith('/'):
15 path += '/'
17 logging.info('Archiving %s to %s', path, results_host)
18 utility = drone_utility.DroneUtility()
19 utility.sync_send_file_to(results_host, path, path, can_fail=True)
22 ResultsArchiver = utils.import_site_class(
23 __file__, 'autotest_lib.scheduler.site_archive_results',
24 'SiteResultsArchiver', BaseResultsArchiver)