Make pep8 checks a bit stricter.

Along with moving to pep8 1.3.3, we also want to standardize
on what we ignore. This patch get's us most of the way there
by setting the ignore list to:
N4,E125, E126, E711,E712.

Almost all changes made here are white-space/indentation changes.

The removal of Hacking N4 errors from the ignore list will
be handled in a seperate patch.

Change-Id: If45f156600485d23769449018590f60b4f69b0c5
This commit is contained in:
John Griffith
2012-11-24 20:17:32 -07:00
parent 0fb98971a7
commit 51418bdd5b
127 changed files with 2754 additions and 2830 deletions

View File

@@ -56,8 +56,7 @@ volume_opts = [
help='use this ip for iscsi'),
cfg.IntOpt('iscsi_port',
default=3260,
help='The port that the iSCSI daemon is listening on'),
]
help='The port that the iSCSI daemon is listening on'), ]
FLAGS = flags.FLAGS
FLAGS.register_opts(volume_opts)
@@ -93,11 +92,11 @@ class VolumeDriver(object):
def check_for_setup_error(self):
"""Returns an error if prerequisites aren't met"""
out, err = self._execute('vgs', '--noheadings', '-o', 'name',
run_as_root=True)
run_as_root=True)
volume_groups = out.split()
if not FLAGS.volume_group in volume_groups:
exception_message = (_("volume group %s doesn't exist")
% FLAGS.volume_group)
% FLAGS.volume_group)
raise exception.VolumeBackendAPIException(data=exception_message)
def _create_volume(self, volume_name, sizestr):
@@ -307,8 +306,9 @@ class ISCSIDriver(VolumeDriver):
# cooresponding target admin class
if not isinstance(self.tgtadm, iscsi.TgtAdm):
try:
iscsi_target = self.db.volume_get_iscsi_target_num(context,
volume['id'])
iscsi_target = self.db.volume_get_iscsi_target_num(
context,
volume['id'])
except exception.NotFound:
LOG.info(_("Skipping ensure_export. No iscsi_target "
"provisioned for volume: %s"), volume['id'])
@@ -320,7 +320,7 @@ class ISCSIDriver(VolumeDriver):
old_name = None
volume_name = volume['name']
if (volume['provider_location'] is not None and
volume['name'] not in volume['provider_location']):
volume['name'] not in volume['provider_location']):
msg = _('Detected inconsistency in provider_location id')
LOG.debug(msg)
@@ -443,8 +443,9 @@ class ISCSIDriver(VolumeDriver):
# cooresponding target admin class
if not isinstance(self.tgtadm, iscsi.TgtAdm):
try:
iscsi_target = self.db.volume_get_iscsi_target_num(context,
volume['id'])
iscsi_target = self.db.volume_get_iscsi_target_num(
context,
volume['id'])
except exception.NotFound:
LOG.info(_("Skipping remove_export. No iscsi_target "
"provisioned for volume: %s"), volume['id'])