Pin pep8 to 1.3.3

Standardize pep8 to 1.3.3 and cleared up any errors
found by pep8 tests.

Change-Id: Ib7eb97d0789556d1676ccad58b5d3364065b7d15
Signed-off-by: Chuck Short <chuck.short@canonical.com>
This commit is contained in:
Chuck Short
2012-11-21 12:03:07 -06:00
committed by Brian Waldon
parent e1955434b7
commit c0ec97f310
9 changed files with 135 additions and 124 deletions

View File

@@ -63,23 +63,27 @@ class OpenStackImagesShell(object):
parser.add_argument('-k', '--insecure', parser.add_argument('-k', '--insecure',
default=False, default=False,
action='store_true', action='store_true',
help="Explicitly allow glanceclient to perform \"insecure\" " help='Explicitly allow glanceclient to perform'
"SSL (https) requests. The server's certificate will " '\"insecure SSL\" (https) requests. The servers'
"not be verified against any certificate authorities. " 'certificate will not be verified against any'
"This option should be used with caution.") 'certificate authorities. This option should'
'be used with caution.')
parser.add_argument('--cert-file', parser.add_argument('--cert-file',
help='Path of certificate file to use in SSL connection. This ' help='Path of certificate file to use in SSL '
'file can optionally be prepended with the private key.') 'connection. This file can optionally be'
'prepended with the private key.')
parser.add_argument('--key-file', parser.add_argument('--key-file',
help='Path of client key to use in SSL connection. This option is ' help='Path of client key to use in SSL '
'not necessary if your key is prepended to your cert file.') 'connection. This option is not necessary '
'if your key is prepended to your cert file.')
parser.add_argument('--ca-file', parser.add_argument('--ca-file',
help='Path of CA SSL certificate(s) used to verify the remote ' help='Path of CA SSL certificate(s) used to verify'
'server\'s certificate. Without this option glance looks ' 'the remote server\'s certificate. Without this '
'for the default system CA certificates.') 'option glance looks for the default system '
'CA certificates.')
parser.add_argument('--timeout', parser.add_argument('--timeout',
default=600, default=600,
@@ -100,21 +104,22 @@ class OpenStackImagesShell(object):
parser.add_argument('--dry-run', parser.add_argument('--dry-run',
default=False, default=False,
action='store_true', action='store_true',
help='DEPRECATED! Only used for deprecated legacy commands.') help='DEPRECATED! Only used for deprecated '
'legacy commands.')
#NOTE(bcwaldon): DEPRECATED #NOTE(bcwaldon): DEPRECATED
parser.add_argument('--ssl', parser.add_argument('--ssl',
dest='use_ssl', dest='use_ssl',
default=False, default=False,
action='store_true', action='store_true',
help='DEPRECATED! Send a fully-formed endpoint using ' help='DEPRECATED! Send a fully-formed endpoint '
'--os-image-url instead.') 'using --os-image-url instead.')
#NOTE(bcwaldon): DEPRECATED #NOTE(bcwaldon): DEPRECATED
parser.add_argument('-H', '--host', parser.add_argument('-H', '--host',
metavar='ADDRESS', metavar='ADDRESS',
help='DEPRECATED! Send a fully-formed endpoint using ' help='DEPRECATED! Send a fully-formed endpoint '
'--os-image-url instead.') 'using --os-image-url instead.')
#NOTE(bcwaldon): DEPRECATED #NOTE(bcwaldon): DEPRECATED
parser.add_argument('-p', '--port', parser.add_argument('-p', '--port',
@@ -122,8 +127,8 @@ class OpenStackImagesShell(object):
metavar='PORT', metavar='PORT',
type=int, type=int,
default=9292, default=9292,
help='DEPRECATED! Send a fully-formed endpoint using ' help='DEPRECATED! Send a fully-formed endpoint '
'--os-image-url instead.') 'using --os-image-url instead.')
parser.add_argument('--os-username', parser.add_argument('--os-username',
default=utils.env('OS_USERNAME'), default=utils.env('OS_USERNAME'),
@@ -217,7 +222,8 @@ class OpenStackImagesShell(object):
help='DEPRECATED! Use --os-image-url.') help='DEPRECATED! Use --os-image-url.')
parser.add_argument('--os-image-api-version', parser.add_argument('--os-image-api-version',
default=utils.env('OS_IMAGE_API_VERSION', default='1'), default=utils.env(
'OS_IMAGE_API_VERSION', default='1'),
help='Defaults to env[OS_IMAGE_API_VERSION] or 1') help='Defaults to env[OS_IMAGE_API_VERSION] or 1')
parser.add_argument('--os_image_api_version', parser.add_argument('--os_image_api_version',
@@ -239,7 +245,8 @@ class OpenStackImagesShell(object):
#NOTE(bcwaldon): DEPRECATED #NOTE(bcwaldon): DEPRECATED
parser.add_argument('-S', '--os_auth_strategy', parser.add_argument('-S', '--os_auth_strategy',
help='DEPRECATED! This option is completely ignored.') help='DEPRECATED! This option is '
'completely ignored.')
return parser return parser
@@ -375,19 +382,23 @@ class OpenStackImagesShell(object):
else: else:
if not args.os_username: if not args.os_username:
raise exc.CommandError("You must provide a username via" raise exc.CommandError("You must provide a username via"
" either --os-username or env[OS_USERNAME]") " either --os-username or "
"env[OS_USERNAME]")
if not args.os_password: if not args.os_password:
raise exc.CommandError("You must provide a password via" raise exc.CommandError("You must provide a password via"
" either --os-password or env[OS_PASSWORD]") " either --os-password or "
"env[OS_PASSWORD]")
if not (args.os_tenant_id or args.os_tenant_name): if not (args.os_tenant_id or args.os_tenant_name):
raise exc.CommandError("You must provide a tenant_id via" raise exc.CommandError("You must provide a tenant_id via"
" either --os-tenant-id or via env[OS_TENANT_ID]") " either --os-tenant-id or "
"via env[OS_TENANT_ID]")
if not args.os_auth_url: if not args.os_auth_url:
raise exc.CommandError("You must provide an auth url via" raise exc.CommandError("You must provide an auth url via"
" either --os-auth-url or via env[OS_AUTH_URL]") " either --os-auth-url or "
"via env[OS_AUTH_URL]")
kwargs = { kwargs = {
'username': args.os_username, 'username': args.os_username,
'password': args.os_password, 'password': args.os_password,

View File

@@ -6,6 +6,6 @@ nose-exclude
nosexcover nosexcover
openstack.nose_plugin openstack.nose_plugin
nosehtmloutput nosehtmloutput
pep8==1.2 pep8==1.3.3
setuptools-git>=0.4 setuptools-git>=0.4
sphinx>=1.1.2 sphinx>=1.1.2