Skip to content

Commit c7cd5e4

Browse files
davidfdrmbwhite
authored andcommitted
Formatting changes.
Signed-off-by: David Reis <davidfdr@gmail.com>
1 parent ae56028 commit c7cd5e4

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

plugins/modules/peer.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -573,11 +573,13 @@
573573

574574

575575
def get_crypto(console, module):
576+
576577
# Get the crypto configuration.
577578
return {'enrollment': get_crypto_enrollment_config(console, module)}
578579

579580

580581
def get_crypto_enrollment_config(console, module):
582+
581583
# Get the crypto configuration.
582584
return {
583585
'component': get_crypto_enrollment_component_config(console, module),
@@ -592,6 +594,7 @@ def get_crypto_enrollment_component_config(console, module):
592594

593595

594596
def get_crypto_enrollment_ca_config(console, module):
597+
595598
# Get the enrollment configuration for the ordering services MSP.
596599
certificate_authority = get_certificate_authority_by_module(console, module)
597600
certificate_authority_url = urllib.parse.urlsplit(certificate_authority.api_url)
@@ -608,6 +611,7 @@ def get_crypto_enrollment_ca_config(console, module):
608611

609612

610613
def get_crypto_enrollment_tlsca_config(console, module):
614+
611615
# Get the enrollment configuration for the ordering services TLS.
612616
certificate_authority = get_certificate_authority_by_module(console, module)
613617
certificate_authority_url = urllib.parse.urlsplit(certificate_authority.api_url)
@@ -624,6 +628,7 @@ def get_crypto_enrollment_tlsca_config(console, module):
624628

625629

626630
def main():
631+
627632
# Create the module.
628633
argument_spec = dict(
629634
state=dict(type='str', default='present', choices=['present', 'absent']),
@@ -899,8 +904,7 @@ def main():
899904
diff = diff_dicts(peer, new_peer)
900905
for change in diff:
901906
if change not in permitted_changes:
902-
raise Exception(
903-
f'{change} cannot be changed from {peer[change]} to {new_peer[change]} for existing peer')
907+
raise Exception(f'{change} cannot be changed from {peer[change]} to {new_peer[change]} for existing peer')
904908

905909
# If a change was supplied to resources, apply the change to the entire resources
906910
if module.params['resources'] is not None:
@@ -909,6 +913,7 @@ def main():
909913
# If the peer has changed, apply the changes.
910914
peer_changed = not equal_dicts(peer, new_peer)
911915
if peer_changed:
916+
912917
# Log the differences.
913918
module.json_log({
914919
'msg': 'differences detected, updating peer',
@@ -934,8 +939,7 @@ def main():
934939
crypto = module.params['crypto']
935940
if crypto:
936941
for config_type in ['enrollment', 'msp']:
937-
expected_admins = crypto.get(config_type, dict()).get('component', dict()).get('admincerts',
938-
None)
942+
expected_admins = crypto.get(config_type, dict()).get('component', dict()).get('admincerts', None)
939943
if expected_admins:
940944
break
941945
if expected_admins:

0 commit comments

Comments
 (0)