Eliminated non-essential warning log in mailto:// parsing

This commit is contained in:
Chris Caron 2024-10-03 22:29:51 -04:00
parent 130edde6ca
commit 260d30aec1

View File

@ -1440,14 +1440,9 @@ class NotifyEmail(NotifyBase):
from_addr = NotifyEmail.unquote(results['qsd']['from']) from_addr = NotifyEmail.unquote(results['qsd']['from'])
if 'name' in results['qsd'] and len(results['qsd']['name']): if 'name' in results['qsd'] and len(results['qsd']['name']):
# Depricate use of both `from=` and `name=` in the same url as
# they will be synomomus of one another in the future.
from_addr = formataddr( from_addr = formataddr(
(NotifyEmail.unquote(results['qsd']['name']), from_addr), (NotifyEmail.unquote(results['qsd']['name']), from_addr),
charset='utf-8') charset='utf-8')
logger.warning(
'Email name= and from= are synonymous; '
'use one or the other.')
elif 'name' in results['qsd'] and len(results['qsd']['name']): elif 'name' in results['qsd'] and len(results['qsd']['name']):
# Extract from name to associate with from address # Extract from name to associate with from address