Fix constructor arguments to source

Instatiations of sources all passed (driver, connection) to the
constructor, which was expecting (config, connection).  The
config option is currently ignored (sources currently have no
additional configuration), which is why we didn't notice the
discrepancy.

Update the constructor to (driver, connection, optional config)
to match the rest of the driver-related classes.

Change-Id: Ibc878b51b81950559d39b00b1591864c7661fe7c
This commit is contained in:
James E. Blair 2017-03-28 15:52:26 -07:00
parent 948fe9a6ff
commit f43b53a67f
1 changed files with 3 additions and 2 deletions

View File

@ -27,9 +27,10 @@ class BaseSource(object):
Defines the exact public methods that must be supplied."""
def __init__(self, source_config={}, connection=None):
self.source_config = source_config
def __init__(self, driver, connection, config=None):
self.driver = driver
self.connection = connection
self.config = config or {}
@abc.abstractmethod
def getRefSha(self, project, ref):