Support empty ssh_key_filename from configuration

Support the case when key is provided by ssh-agent,
as there's no way to provide None value from config to StrOpt without
changing default behavior.

Change-Id: Ib715dbad5b9069f55320bce26182a19aeebf5201
This commit is contained in:
Andrii Ostapenko 2019-03-05 13:31:09 -06:00
parent ab22641d51
commit 5b4069aeb7

View File

@ -80,7 +80,7 @@ class Gerrit(Rcs):
self.close()
def setup(self, **kwargs):
self.key_filename = kwargs.get('key_filename')
self.key_filename = kwargs.get('key_filename') or None
self.username = kwargs.get('username')
self.ssh_errors_limit = kwargs.get('gerrit_retry') or SSH_ERRORS_LIMIT