Merge "Fix some typos"
This commit is contained in:
commit
9327cc7f54
@ -227,7 +227,7 @@ CATEGORIES = {
|
||||
}
|
||||
|
||||
|
||||
# Modifying similiar code from nova/cmd/manage.py
|
||||
# Modifying similar code from nova/cmd/manage.py
|
||||
def methods_of(obj):
|
||||
"""Get all callable methods of an object that don't start with underscore
|
||||
|
||||
@ -238,7 +238,7 @@ def methods_of(obj):
|
||||
for fn in dir(obj):
|
||||
if callable(getattr(obj, fn)) and not fn.startswith('_'):
|
||||
result.append((fn, getattr(obj, fn),
|
||||
getattr(obj, fn+'_description', None)))
|
||||
getattr(obj, fn + '_description', None)))
|
||||
return result
|
||||
|
||||
|
||||
|
@ -164,7 +164,7 @@ class DatabaseManager(object):
|
||||
args.func(args)
|
||||
|
||||
|
||||
def _exception_is_successfull_exit(thrown_exception):
|
||||
def _exception_is_successful_exit(thrown_exception):
|
||||
return (isinstance(thrown_exception, SystemExit) and
|
||||
(thrown_exception.code is None or thrown_exception.code == 0))
|
||||
|
||||
@ -175,7 +175,7 @@ def main():
|
||||
dm = DatabaseManager(CONF)
|
||||
dm.execute()
|
||||
except Exception as ex:
|
||||
if not _exception_is_successfull_exit(ex):
|
||||
if not _exception_is_successful_exit(ex):
|
||||
LOG.exception(u._LE('Problem seen trying to run'
|
||||
' barbican db manage'))
|
||||
sys.stderr.write("ERROR: {0}\n".format(ex))
|
||||
|
@ -364,7 +364,7 @@ class NewSecretMetadataValidator(ValidatorBase):
|
||||
"$schema": "http://json-schema.org/draft-03/schema",
|
||||
"properties": {
|
||||
"metadata": {"type": "object", "required": True},
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
def validate(self, json_data, parent_schema=None):
|
||||
|
@ -213,12 +213,12 @@ def create_certificate_authority(project=None, parsed_ca_in=None,
|
||||
|
||||
|
||||
def create_preferred_cert_authority(cert_authority, session=None):
|
||||
prefered_cert_authority = models.PreferredCertificateAuthority(
|
||||
preferred_cert_authority = models.PreferredCertificateAuthority(
|
||||
ca_id=cert_authority.id,
|
||||
project_id=cert_authority.project_id)
|
||||
preferred_ca_repo = repositories.get_preferred_ca_repository()
|
||||
preferred_ca_repo.create_from(prefered_cert_authority, session=session)
|
||||
return prefered_cert_authority
|
||||
preferred_ca_repo.create_from(preferred_cert_authority, session=session)
|
||||
return preferred_cert_authority
|
||||
|
||||
|
||||
def create_project_cert_authority(certificate_authority=None, session=None):
|
||||
|
Loading…
x
Reference in New Issue
Block a user