summaryrefslogtreecommitdiff
path: root/alot/db/utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'alot/db/utils.py')
-rw-r--r--alot/db/utils.py28
1 files changed, 0 insertions, 28 deletions
diff --git a/alot/db/utils.py b/alot/db/utils.py
deleted file mode 100644
index 99684afd..00000000
--- a/alot/db/utils.py
+++ /dev/null
@@ -1,28 +0,0 @@
-# encoding=utf-8
-# Copyright (C) 2011-2012 Patrick Totzke <patricktotzke@gmail.com>
-# Copyright © 2017 Dylan Baker <dylan@pnwbakers.com>
-# This file is released under the GNU GPL, version 3 or a later revision.
-# For further details see the COPYING file
-import os
-import email
-import email.charset as charset
-import email.policy
-import email.utils
-import logging
-
-from ..settings.const import settings
-
-charset.add_charset('utf-8', charset.QP, charset.QP, 'utf-8')
-
-def formataddr(pair):
- """ this is the inverse of email.utils.parseaddr:
- other than email.utils.formataddr, this
- - *will not* re-encode unicode strings, and
- - *will* re-introduce quotes around real names containing commas
- """
- name, address = pair
- if not name:
- return address
- elif ',' in name:
- name = "\"" + name + "\""
- return "{0} <{1}>".format(name, address)