Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace logging.warn usage with logging.warning #344

Merged
merged 1 commit into from
May 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion afew/MailMover.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def move(self, maildir, rules):
shutil.copy2(fname, self.get_new_name(fname, destination))
to_delete_fnames.append(fname)
except shutil.SameFileError:
logging.warn("trying to move '{}' onto itself".format(fname))
logging.warning("trying to move '{}' onto itself".format(fname))
continue
except shutil.Error as e:
# this is ugly, but shutil does not provide more
Expand Down
6 changes: 3 additions & 3 deletions afew/files.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,17 +46,17 @@ def new_mail(message):
filter_.run('id:"{}"'.format(message.get_message_id()))
filter_.commit(self.options.dry_run)
except Exception as e:
logging.warn('Error processing mail with filter {!r}: {}'.format(filter_.message, e))
logging.warning('Error processing mail with filter {!r}: {}'.format(filter_.message, e))

try:
self.database.add_message(event.pathname,
sync_maildir_flags=True,
new_mail_handler=new_mail)
except notmuch.FileError as e:
logging.warn('Error opening mail file: {}'.format(e))
logging.warning('Error opening mail file: {}'.format(e))
return
except notmuch.FileNotEmailError as e:
logging.warn('File does not look like an email: {}'.format(e))
logging.warning('File does not look like an email: {}'.format(e))
return
else:
if src_pathname:
Expand Down