FAQ | This is a LIVE service | Changelog

Commit ab2f73a4 authored by Robin Goodall's avatar Robin Goodall 💬
Browse files

Fix logging warn depreciation

parent 94c5183e
......@@ -77,7 +77,7 @@ def main(argv=None):
dry_run = not opts['--really-do-this']
if dry_run:
LOG.warn('Operating in dry-run mode - no changes will be made')
LOG.warning('Operating in dry-run mode - no changes will be made')
if opts['student-inst-members']:
_student_inst_members(opts, dry_run)
......
......@@ -25,7 +25,7 @@ def fetch_inst_mapping(session: requests_oauthlib.OAuth2Session) -> Dict[str, st
try:
id = Identifier.from_string(i, find_by_alias=True)
except ValueError as e:
LOG.warn(e)
LOG.warning(e)
continue
# Only interested in Student Records Institution ids
if id.scheme == IdentifierSchemes.STUDENT_INSTITUTION:
......
......@@ -47,7 +47,7 @@ def get_students_by_group(
try:
aff_scheme = IdentifierSchemes.from_string(a.scheme, find_by_alias=True)
except ValueError as e:
LOG.warn(e)
LOG.warning(e)
continue
# Ignore non college/departmental affiliations.
if aff_scheme != IdentifierSchemes.STUDENT_INSTITUTION:
......@@ -79,7 +79,7 @@ def get_students_by_group(
try:
id_scheme = IdentifierSchemes.from_string(i.scheme, find_by_alias=True)
except ValueError as e:
LOG.warn(f'Identifier: {i.value} ({a.value}) - "{e}"')
LOG.warning(f'Identifier: {i.value} ({a.value}) - "{e}"')
continue
# Only identifiers from Student Records Person scheme (USNs)
if id_scheme != IdentifierSchemes.USN:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment