~abompard/mailman/import21

« back to all changes in this revision

Viewing changes to src/mailman/utilities/importer.py

  • Committer: Aurélien Bompard
  • Date: 2013-10-22 13:33:55 UTC
  • Revision ID: aurelien@bompard.org-20131022133355-suvcjfqsnnwijyy5
Minor pyflakes fixes

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
__metaclass__ = type
23
23
__all__ = [
24
24
    'import_config_pck',
25
 
    'ImportError',
 
25
    'Import21Error',
26
26
    ]
27
27
 
28
28
 
62
62
    for encoding in ("ascii", "utf-8"):
63
63
        try:
64
64
            return unicode(value, encoding)
65
 
        except UnicodeDecodeError, e:
 
65
        except UnicodeDecodeError:
66
66
            continue
67
67
    # we did our best, use replace
68
68
    return unicode(value, 'ascii', 'replace')