From 94ca8a615bb5273fdc0aaf5994bef01fa3158da1 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 13 Nov 2016 22:39:21 +0530 Subject: [PATCH] ... --- src/calibre/gui2/preferences/emailp.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/calibre/gui2/preferences/emailp.py b/src/calibre/gui2/preferences/emailp.py index a79e12950d..f28c5857f9 100644 --- a/src/calibre/gui2/preferences/emailp.py +++ b/src/calibre/gui2/preferences/emailp.py @@ -5,7 +5,7 @@ __license__ = 'GPL v3' __copyright__ = '2010, Kovid Goyal ' __docformat__ = 'restructuredtext en' -import textwrap +import textwrap, re from PyQt5.Qt import QAbstractTableModel, QFont, Qt @@ -148,7 +148,7 @@ class EmailAccounts(QAbstractTableModel): # {{{ if aval: self.tags[account] = aval elif col == 1: - self.accounts[account][0] = unicode(value or '').upper() + self.accounts[account][0] = re.sub(r'\s+', ',', unicode(value or '').upper()) elif col == 0: na = unicode(value or '') from email.utils import parseaddr @@ -287,4 +287,3 @@ if __name__ == '__main__': from PyQt5.Qt import QApplication app = QApplication([]) test_widget('Sharing', 'Email') -