PEP 8/Pyflakes fixes

This commit is contained in:
Arash Ghoreyshi 2013-08-16 15:18:31 -05:00
parent 4df86dcdcb
commit bc47c7c140
7 changed files with 8 additions and 7 deletions

View File

@ -1 +1 @@
"""Barbican Client Library Binding"""
"""Barbican Client Library Binding"""

View File

@ -11,7 +11,6 @@ from barbicanclient.common import auth
from barbicanclient.openstack.common import log
from barbicanclient.common.exceptions import ClientException
from barbicanclient.openstack.common.gettextutils import _
from openstack.common.timeutils import parse_isotime
from urlparse import urljoin

View File

@ -64,7 +64,7 @@ def authenticate(auth_url, user, key, tenant, **kwargs):
filter_value=region,
service_type=service_type,
endpoint_type=endpoint_type)
except exceptions.EndpointNotFound as ex:
except exceptions.EndpointNotFound:
raise ClientException('Endpoint not found in service catalog')
return endpoint, _ksclient.auth_token

View File

@ -23,6 +23,7 @@ import logging.handlers
import os
import sys
from barbicanclient.openstack.common.gettextutils import _
from barbicanclient.version import __version__
from oslo.config import cfg

View File

@ -7,4 +7,4 @@ def proc_template(template, **kwargs):
dictionary args and returning the strings.
"""
return template.format(**dict([(k, urllib.quote(v))
for k, v in kwargs.items()]))
for k, v in kwargs.items()]))

View File

@ -46,8 +46,8 @@ class Keep:
def add_create_args(self):
create_parser = self.subparsers.add_parser('create', help='Create a '
'secret or an order')
create_parser.add_argument('--name', '-n', help='a human-friendly name'
)
create_parser.add_argument('--name', '-n',
help='a human-friendly name')
create_parser.add_argument('--algorithm', '-a', default='aes', help='t'
'he algorithm; used only for reference (def'
'ault: %(default)s)')

View File

@ -21,7 +21,8 @@ class Secret(object):
self.algorithm = secret_dict.get('algorithm')
self.bit_length = secret_dict.get('bit_length')
self.payload_content_type = secret_dict.get('payload_content_type')
self.payload_content_encoding = secret_dict.get('payload_content_encoding')
self.payload_content_encoding = secret_dict.get(
'payload_content_encoding')
self.cypher_type = secret_dict.get('cypher_type')
self.name = secret_dict.get('name')