Skip to content

Commit

Permalink
More fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mxamin committed Apr 5, 2024
1 parent 1061a9d commit 7f30b67
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/softhsm_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ def setup() -> None:
)
signer_cert_pem = _temp_file()
openssl_conf = _temp_file()
logging.debug('Generating OpenSSL config for version {}'.format(openssl_version))
logging.debug(f'Generating OpenSSL config for version {openssl_version}')
with open(openssl_conf, 'w') as f:
f.write(
'\n'.join(
Expand All @@ -224,7 +224,7 @@ def setup() -> None:
'[pkcs11_section]',
'engine_id = pkcs11',
# dynamic_path,
'MODULE_PATH = %s' % component_path['P11_MODULE'],
f"MODULE_PATH = {component_path['P11_MODULE']}",
'init = 0',
]
)
Expand Down Expand Up @@ -306,15 +306,15 @@ def setup() -> None:
softhsm_conf=softhsm_conf,
)

# TODO: Should be teardowned in teardown:
# TODO: Should be teardowned in teardown # noqa: T101
os.environ['SOFTHSM_CONF'] = softhsm_conf
os.environ['SOFTHSM2_CONF'] = softhsm_conf

except Exception as ex:
print('-' * 64)
traceback.print_exc()
print('-' * 64)
logging.error(f'PKCS11 tests disabled: unable to initialize test token: {ex}')
logging.error('PKCS11 tests disabled: unable to initialize test token: %s', ex)
raise ex


Expand Down

0 comments on commit 7f30b67

Please sign in to comment.