]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
pybind/mgr/cephadm/module: assure self.ssh_user is not None
authorKefu Chai <kchai@redhat.com>
Tue, 19 Jan 2021 17:25:10 +0000 (01:25 +0800)
committerKefu Chai <kchai@redhat.com>
Tue, 26 Jan 2021 10:02:24 +0000 (18:02 +0800)
to appease mypy

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/pybind/mgr/cephadm/module.py

index 063fc0d673104f7a0d542b6dd7a3836f967e8e9d..9f0895ff363e834ba01ecf30c2e1cb86e20b67c6 100644 (file)
@@ -1092,6 +1092,7 @@ class CephadmOrchestrator(orchestrator.Orchestrator, MgrModule,
                 return conn, r
             else:
                 self._reset_con(host)
+        assert self.ssh_user
         n = self.ssh_user + '@' + host
         self.log.debug("Opening connection to {} with ssh options '{}'".format(
             n, self._ssh_options))