1# Copyright 2017 The Chromium Authors 2# Use of this source code is governed by a BSD-style license that can be 3# found in the LICENSE file. 4 5 6from pylib import constants 7from pylib.output import local_output_manager 8from pylib.output import remote_output_manager 9from pylib.utils import local_utils 10 11 12def CreateOutputManager(args): 13 if args.local_output or not local_utils.IsOnSwarming(): 14 return local_output_manager.LocalOutputManager( 15 output_dir=constants.GetOutDirectory()) 16 return remote_output_manager.RemoteOutputManager( 17 bucket=args.gs_results_bucket) 18