Various pep8/HACKING fixes for Cinder.
Fix some ordering/pep8/hacking issues in preperation for re-enabling full pep8/HACKING checks in tox. Change-Id: I7151ac73d1ace5d98046580e6d1c6a1dcc6c4cef
This commit is contained in:
@@ -26,9 +26,9 @@ from cinder import flags
|
||||
from cinder.openstack.common import log as logging
|
||||
|
||||
|
||||
import sqlalchemy
|
||||
import migrate
|
||||
from migrate.versioning import util as migrate_util
|
||||
import sqlalchemy
|
||||
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
@@ -317,8 +317,8 @@ class SSHPool(pools.Pool):
|
||||
transport.set_keepalive(self.conn_timeout)
|
||||
return ssh
|
||||
except Exception as e:
|
||||
msg = "Error connecting via ssh: %s" % e
|
||||
LOG.error(_(msg))
|
||||
msg = _("Error connecting via ssh: %s") % e
|
||||
LOG.error(msg)
|
||||
raise paramiko.SSHException(msg)
|
||||
|
||||
def get(self):
|
||||
|
||||
@@ -122,11 +122,11 @@ class SanISCSIDriver(ISCSIDriver):
|
||||
except Exception as e:
|
||||
LOG.error(e)
|
||||
greenthread.sleep(random.randint(20, 500) / 100.0)
|
||||
raise paramiko.SSHException(_("SSH Command failed after '%r' "
|
||||
"attempts: '%s'"
|
||||
% (total_attempts, command)))
|
||||
raise paramiko.SSHException(_("SSH Command failed after "
|
||||
"'%(total_attempts)r' attempts"
|
||||
": '%(command)s'"), locals())
|
||||
except Exception as e:
|
||||
LOG.error(_("Error running ssh command: %s" % command))
|
||||
LOG.error(_("Error running ssh command: %s") % command)
|
||||
raise e
|
||||
|
||||
def ensure_export(self, context, volume):
|
||||
|
||||
Reference in New Issue
Block a user