File tree Expand file tree Collapse file tree
src/clusterfuzz/_internal Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -37,7 +37,8 @@ class SwarmingAPI:
3737
3838 def __init__ (self ):
3939 self ._config = get_swarming_config ()
40- self ._base_url = f"https://{ self ._config .get ('swarming_server' )} /prpc/"
40+ if self ._config :
41+ self ._base_url = f"https://{ self ._config .get ('swarming_server' )} /prpc/"
4142
4243 def _get_headers (self ) -> dict [str , str ]:
4344 """Checks config and returns headers for pRPC request.
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ class SwarmingServiceTest(unittest.TestCase):
2727 def setUp (self ):
2828 helpers .patch (self , [
2929 'clusterfuzz._internal.swarming.is_swarming_task' ,
30- 'clusterfuzz._internal.swarming.service._get_api' ,
30+ 'clusterfuzz._internal.swarming.service.SwarmingService. _get_api' ,
3131 'clusterfuzz._internal.swarming.create_new_task_request' ,
3232 'clusterfuzz._internal.base.tasks.task_utils.get_command_from_module' ,
3333 'clusterfuzz._internal.metrics.logs.error' ,
You can’t perform that action at this time.
0 commit comments