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:
Dan Prince
2012-11-15 11:26:31 -05:00
parent 4206f0db05
commit 41c37d3666
5 changed files with 10 additions and 10 deletions

View File

@@ -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__)

View File

@@ -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):

View File

@@ -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):