Skip to content

Commit

Permalink
codacy; and, use logging.config.dictConfig
Browse files Browse the repository at this point in the history
  • Loading branch information
d-w-moore committed Nov 6, 2024
1 parent 183e6e6 commit 2520253
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion irods/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,7 @@ def _login_pam(self):
f.write(obf.encode(auth_out.result_))
logger.debug('new PAM pw write succeeded')

logger.info(f"PAM authorization validated (via {method})")
logger.info(f"PAM authorization validated (via %s)",method)

def read_file(self, desc, size=-1, buffer=None):
if size < 0:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,14 @@ teardown()
sudo su - irods -c 'iadmin rpp alice'
rm -f ~/.irods/.irodsA
$PYTHON -c "import irods.client_init
import logging
logger = logging.getLogger('irods.connection')
logger.setLevel(logging.INFO)
logger.addHandler(logging.FileHandler('$logfile'))
import logging.config
logging.config.dictConfig(
{'handlers': {'file': {'class': 'logging.FileHandler',
'filename': '$logfile'}},
'loggers': {'irods.connection': {'handlers': ['file'],
'level': 'INFO'}},
'version': 1}
)
irods.client_configuration.legacy_auth.pam.force_use_of_dedicated_pam_api = $force_long_token_compatible_api
irods.client_init.write_pam_credentials_to_secrets_file('$ALICES_NEW_PAM_PASSWD')"

Expand Down

0 comments on commit 2520253

Please sign in to comment.