Skip to content
Permalink
Browse files

Merge pull request #1812 from jeromelebleu/drop-python2

Remove Python 2 support
  • Loading branch information
tonioo committed Jan 13, 2020
2 parents 5912f08 + a9ef9b7 commit 4fb614756cb61d5e599a0319595e7c91876860bb
Showing with 71 additions and 1,059 deletions.
  1. +0 −1 .travis.yml
  2. +2 −2 README.rst
  3. +0 −3 bin/modoboa-admin.py
  4. +1 −1 doc/manual_installation/webserver.rst
  5. +0 −4 modoboa/__init__.py
  6. +0 −4 modoboa/admin/__init__.py
  7. +3 −7 modoboa/admin/api.py
  8. +0 −4 modoboa/admin/app_settings.py
  9. +0 −4 modoboa/admin/apps.py
  10. +0 −4 modoboa/admin/constants.py
  11. +0 −4 modoboa/admin/factories.py
  12. +0 −4 modoboa/admin/forms/__init__.py
  13. +0 −4 modoboa/admin/forms/account.py
  14. +0 −4 modoboa/admin/forms/alias.py
  15. +0 −4 modoboa/admin/forms/domain.py
  16. +0 −4 modoboa/admin/forms/export.py
  17. +0 −4 modoboa/admin/forms/forward.py
  18. +0 −4 modoboa/admin/forms/import_.py
  19. +0 −4 modoboa/admin/handlers.py
  20. +0 −4 modoboa/admin/lib.py
  21. +0 −4 modoboa/admin/management/commands/handle_mailbox_operations.py
  22. +0 −4 modoboa/admin/management/commands/modo.py
  23. +1 −11 modoboa/admin/management/commands/subcommands/_export.py
  24. +7 −19 modoboa/admin/management/commands/subcommands/_import.py
  25. +0 −4 modoboa/admin/management/commands/subcommands/_manage_dkim_keys.py
  26. +0 −4 modoboa/admin/management/commands/subcommands/_mx.py
  27. +0 −4 modoboa/admin/management/commands/subcommands/_repair.py
  28. +0 −3 modoboa/admin/migrations/0001_initial.py
  29. +0 −3 modoboa/admin/migrations/0002_migrate_from_modoboa_admin.py
  30. +0 −3 modoboa/admin/migrations/0003_auto_20151118_1215.py
  31. +0 −3 modoboa/admin/migrations/0004_auto_20160914_0907.py
  32. +0 −3 modoboa/admin/migrations/0005_auto_20161026_1003.py
  33. +0 −3 modoboa/admin/migrations/0006_auto_20161104_1900.py
  34. +0 −3 modoboa/admin/migrations/0007_auto_20161104_1915.py
  35. +0 −3 modoboa/admin/migrations/0008_domain_enable_dns_checks.py
  36. +0 −3 modoboa/admin/migrations/0009_auto_20170215_0948.py
  37. +0 −3 modoboa/admin/migrations/0010_auto_20170215_1328.py
  38. +0 −3 modoboa/admin/migrations/0011_domain_transport.py
  39. +0 −3 modoboa/admin/migrations/0012_auto_20180112_1658.py
  40. +0 −3 modoboa/admin/migrations/0013_auto_20180124_2311.py
  41. +0 −3 modoboa/admin/migrations/0014_auto_20181017_1628.py
  42. +0 −1 modoboa/admin/migrations/__init__.py
  43. +0 −4 modoboa/admin/models/__init__.py
  44. +0 −4 modoboa/admin/models/alias.py
  45. +0 −4 modoboa/admin/models/base.py
  46. +0 −4 modoboa/admin/models/domain.py
  47. +0 −4 modoboa/admin/models/domain_alias.py
  48. +0 −4 modoboa/admin/models/mailbox.py
  49. +0 −4 modoboa/admin/models/mxrecord.py
  50. +0 −5 modoboa/admin/postfix_maps.py
  51. +0 −4 modoboa/admin/serializers.py
  52. +0 −4 modoboa/admin/signals.py
  53. +0 −4 modoboa/admin/templatetags/admin_tags.py
  54. +0 −4 modoboa/admin/tests/test_account.py
  55. +0 −4 modoboa/admin/tests/test_alias.py
  56. +1 −11 modoboa/admin/tests/test_api.py
  57. +1 −11 modoboa/admin/tests/test_domain.py
  58. +0 −4 modoboa/admin/tests/test_domain_alias.py
  59. +1 −6 modoboa/admin/tests/test_export.py
  60. +1 −11 modoboa/admin/tests/test_import_.py
  61. +1 −11 modoboa/admin/tests/test_mailbox_operations.py
  62. +0 −4 modoboa/admin/tests/test_mapfiles.py
  63. +1 −10 modoboa/admin/tests/test_mx.py
  64. +0 −4 modoboa/admin/tests/test_password_schemes.py
  65. +0 −4 modoboa/admin/tests/test_repair.py
  66. +0 −4 modoboa/admin/tests/test_user.py
  67. +0 −4 modoboa/admin/tests/utils.py
  68. +0 −4 modoboa/admin/urls.py
  69. +5 −9 modoboa/admin/urls_api.py
  70. +0 −4 modoboa/admin/views/__init__.py
  71. +0 −4 modoboa/admin/views/alias.py
  72. +0 −4 modoboa/admin/views/dns.py
  73. +0 −4 modoboa/admin/views/domain.py
  74. +4 −11 modoboa/admin/views/export.py
  75. +0 −4 modoboa/admin/views/identity.py
  76. +1 −10 modoboa/admin/views/import_.py
  77. +0 −4 modoboa/admin/views/user.py
  78. +0 −4 modoboa/core/__init__.py
  79. +0 −4 modoboa/core/app_settings.py
  80. +0 −4 modoboa/core/apps.py
  81. +0 −4 modoboa/core/checks/__init__.py
  82. +0 −4 modoboa/core/checks/settings_checks.py
  83. +0 −4 modoboa/core/commands/__init__.py
  84. +1 −7 modoboa/core/commands/deploy.py
  85. +0 −4 modoboa/core/commands/help.py
  86. +0 −2 modoboa/core/commands/templates/settings.py.tpl
  87. +0 −4 modoboa/core/constants.py
  88. +0 −4 modoboa/core/context_processors.py
  89. +0 −4 modoboa/core/dev_settings.py
  90. +0 −4 modoboa/core/extensions.py
  91. +0 −4 modoboa/core/factories.py
  92. +0 −4 modoboa/core/forms.py
  93. +0 −4 modoboa/core/handlers.py
  94. +0 −4 modoboa/core/loggers.py
  95. +0 −5 modoboa/core/management/commands/clean_inactive_accounts.py
  96. +0 −4 modoboa/core/management/commands/cleanlogs.py
  97. +0 −4 modoboa/core/management/commands/communicate_with_public_api.py
  98. +0 −4 modoboa/core/management/commands/generate_postfix_maps.py
  99. +0 −4 modoboa/core/management/commands/load_initial_data.py
  100. +0 −4 modoboa/core/management/commands/set_default_site.py
  101. +0 −4 modoboa/core/middleware.py
  102. +0 −3 modoboa/core/migrations/0001_initial.py
  103. +0 −3 modoboa/core/migrations/0002_delete_extension.py
  104. +0 −3 modoboa/core/migrations/0003_user_master_user.py
  105. +0 −3 modoboa/core/migrations/0004_auto_20150728_1228.py
  106. +0 −3 modoboa/core/migrations/0005_user_language.py
  107. +0 −3 modoboa/core/migrations/0006_auto_20151114_1518.py
  108. +0 −3 modoboa/core/migrations/0007_auto_20151116_1349.py
  109. +0 −3 modoboa/core/migrations/0008_localconfig.py
  110. +0 −3 modoboa/core/migrations/0009_auto_20161026_1003.py
  111. +0 −3 modoboa/core/migrations/0010_auto_20161026_1011.py
  112. +0 −3 modoboa/core/migrations/0011_auto_20161104_2217.py
  113. +0 −3 modoboa/core/migrations/0012_auto_20170215_1034.py
  114. +0 −3 modoboa/core/migrations/0013_auto_20170707_1058.py
  115. +0 −3 modoboa/core/migrations/0014_auto_20171010_1746.py
  116. +0 −3 modoboa/core/migrations/0015_auto_20180112_1642.py
  117. +0 −3 modoboa/core/migrations/0016_auto_20180713_1014.py
  118. +0 −3 modoboa/core/migrations/0017_auto_20190705_1045.py
  119. +0 −1 modoboa/core/migrations/__init__.py
  120. +0 −4 modoboa/core/mocks.py
  121. +0 −4 modoboa/core/models.py
  122. +0 −4 modoboa/core/password_hashers/__init__.py
  123. +0 −4 modoboa/core/password_hashers/advanced.py
  124. +1 −7 modoboa/core/password_hashers/base.py
  125. +0 −4 modoboa/core/password_validation.py
  126. +0 −4 modoboa/core/signals.py
  127. +0 −4 modoboa/core/templatetags/core_tags.py
  128. +0 −4 modoboa/core/tests/stupid_extension_1/modo_extension.py
  129. +0 −4 modoboa/core/tests/stupid_extension_2/modo_extension.py
  130. +0 −4 modoboa/core/tests/stupid_extension_2/urls.py
  131. +0 −4 modoboa/core/tests/stupid_extension_2/views.py
  132. +1 −12 modoboa/core/tests/test_authentication.py
  133. +0 −4 modoboa/core/tests/test_checks.py
  134. +1 −4 modoboa/core/tests/test_core.py
  135. +0 −4 modoboa/core/tests/test_extensions.py
  136. +0 −4 modoboa/core/tests/test_ldap.py
  137. +0 −4 modoboa/core/tests/test_views.py
  138. +0 −4 modoboa/core/urls.py
  139. +0 −4 modoboa/core/utils.py
  140. +0 −4 modoboa/core/views/__init__.py
  141. +0 −4 modoboa/core/views/admin.py
  142. +0 −4 modoboa/core/views/auth.py
  143. +0 −4 modoboa/core/views/base.py
  144. +0 −4 modoboa/core/views/dashboard.py
  145. +0 −4 modoboa/core/views/user.py
  146. +0 −2 modoboa/dnstools/factories.py
  147. +0 −2 modoboa/dnstools/lib.py
  148. +0 −3 modoboa/dnstools/migrations/0001_initial.py
  149. +0 −2 modoboa/dnstools/models.py
  150. +0 −2 modoboa/ldapsync/lib.py
  151. +1 −5 modoboa/ldapsync/tests.py
  152. +0 −4 modoboa/lib/api_client.py
  153. +0 −4 modoboa/lib/authbackends.py
  154. +0 −4 modoboa/lib/connections.py
  155. +0 −4 modoboa/lib/cryptutils.py
  156. +0 −4 modoboa/lib/db_utils.py
  157. +17 −28 modoboa/lib/email_utils.py
  158. +0 −4 modoboa/lib/exceptions.py
  159. +0 −4 modoboa/lib/fields.py
  160. +0 −4 modoboa/lib/form_utils.py
  161. +0 −2 modoboa/lib/imap_utf7.py
  162. +1 −6 modoboa/lib/ldap_utils.py
  163. +0 −4 modoboa/lib/listing.py
  164. +0 −4 modoboa/lib/middleware.py
  165. +0 −3 modoboa/lib/migrations/0001_initial.py
  166. +0 −3 modoboa/lib/migrations/0002_rename_parameters.py
  167. +0 −3 modoboa/lib/migrations/0003_rename_parameters.py
  168. +0 −3 modoboa/lib/migrations/0004_auto_20151114_1409.py
  169. +0 −3 modoboa/lib/migrations/0005_auto_20160416_1449.py
  170. +0 −3 modoboa/lib/migrations/0006_auto_20161104_2206.py
  171. +0 −1 modoboa/lib/migrations/__init__.py
  172. +0 −5 modoboa/lib/paginator.py
  173. +0 −4 modoboa/lib/permissions.py
  174. +0 −4 modoboa/lib/signals.py
  175. +0 −5 modoboa/lib/singleton.py
  176. +0 −4 modoboa/lib/sysutils.py
  177. +0 −4 modoboa/lib/templatetags/form_tags.py
  178. +0 −4 modoboa/lib/templatetags/lib_tags.py
  179. +0 −4 modoboa/lib/test_utils.py
  180. +0 −4 modoboa/lib/tests/__init__.py
  181. +0 −4 modoboa/lib/tests/test_cryptutils.py
  182. +0 −4 modoboa/lib/tests/test_email_utils.py
  183. +0 −4 modoboa/lib/tests/test_u2u_decode.py
  184. +0 −4 modoboa/lib/u2u_decode.py
  185. +0 −4 modoboa/lib/validators.py
  186. +0 −4 modoboa/lib/web_utils.py
  187. +0 −4 modoboa/limits/__init__.py
  188. +0 −4 modoboa/limits/app_settings.py
  189. +0 −4 modoboa/limits/apps.py
  190. +0 −4 modoboa/limits/constants.py
  191. +0 −4 modoboa/limits/forms.py
  192. +0 −4 modoboa/limits/handlers.py
  193. +0 −4 modoboa/limits/lib.py
  194. +0 −3 modoboa/limits/migrations/0001_initial.py
  195. +0 −3 modoboa/limits/migrations/0002_auto_20151114_1518.py
  196. +0 −3 modoboa/limits/migrations/0003_auto_20160413_1046.py
  197. +0 −3 modoboa/limits/migrations/0004_auto_20160413_1312.py
  198. +0 −3 modoboa/limits/migrations/0005_auto_20160415_1654.py
  199. +0 −3 modoboa/limits/migrations/0006_auto_20170216_1112.py
  200. +0 −1 modoboa/limits/migrations/__init__.py
  201. +0 −4 modoboa/limits/models.py
  202. +0 −4 modoboa/limits/serializers.py
  203. +0 −4 modoboa/limits/tests/test_api.py
  204. +0 −4 modoboa/limits/tests/test_domain_limits.py
  205. +0 −4 modoboa/limits/tests/test_import.py
  206. +0 −4 modoboa/limits/tests/test_user_limits.py
  207. +1 −5 modoboa/limits/urls_api.py
  208. +0 −4 modoboa/limits/utils.py
  209. +0 −4 modoboa/limits/viewsets.py
  210. +0 −4 modoboa/parameters/apps.py
  211. +0 −4 modoboa/parameters/forms.py
  212. +0 −4 modoboa/parameters/tools.py
  213. +0 −4 modoboa/relaydomains/__init__.py
  214. +0 −4 modoboa/relaydomains/apps.py
  215. +0 −4 modoboa/relaydomains/forms.py
  216. +0 −4 modoboa/relaydomains/handlers.py
  217. +0 −4 modoboa/relaydomains/lib.py
  218. +0 −3 modoboa/relaydomains/migrations/0001_initial.py
  219. +0 −3 modoboa/relaydomains/migrations/0002_migrate_from_modoboa_admin_relaydomains.py
  220. +0 −3 modoboa/relaydomains/migrations/0003_auto_20170116_1508.py
  221. +0 −3 modoboa/relaydomains/migrations/0004_auto_20161105_1424.py
  222. +0 −3 modoboa/relaydomains/migrations/0005_auto_20161105_1426.py
  223. +0 −3 modoboa/relaydomains/migrations/0006_auto_20170215_0948.py
  224. +0 −3 modoboa/relaydomains/migrations/0007_recipientaccess.py
  225. +0 −3 modoboa/relaydomains/migrations/0008_auto_20171123_1653.py
  226. +0 −3 modoboa/relaydomains/migrations/0009_auto_20171124_1508.py
  227. +0 −1 modoboa/relaydomains/migrations/__init__.py
  228. +0 −4 modoboa/relaydomains/models.py
  229. +0 −5 modoboa/relaydomains/postfix_maps.py
  230. +0 −4 modoboa/relaydomains/serializers.py
  231. +0 −4 modoboa/relaydomains/tests.py
  232. +0 −4 modoboa/relaydomains/transport.py
  233. +1 −5 modoboa/relaydomains/urls_api.py
  234. +0 −4 modoboa/relaydomains/viewsets.py
  235. +0 −4 modoboa/test_settings.py
  236. +0 −4 modoboa/transport/__init__.py
  237. +0 −4 modoboa/transport/apps.py
  238. +0 −4 modoboa/transport/backends.py
  239. +0 −4 modoboa/transport/constants.py
  240. +0 −4 modoboa/transport/factories.py
  241. +0 −4 modoboa/transport/forms.py
  242. +0 −4 modoboa/transport/handlers.py
  243. +0 −3 modoboa/transport/migrations/0001_initial.py
  244. +0 −3 modoboa/transport/migrations/0002_auto_20180928_1520.py
  245. +0 −4 modoboa/transport/models.py
  246. +0 −5 modoboa/transport/postfix_maps.py
  247. +0 −4 modoboa/urls.py
  248. +0 −4 modoboa/urls_api.py
  249. +1 −1 mysql-requirements.txt
  250. +9 −11 requirements.txt
  251. +0 −3 setup.cfg
  252. +3 −8 setup.py
  253. +2 −3 test-requirements.txt
  254. +0 −3 tests.py
  255. +1 −1 tox.ini
@@ -1,6 +1,5 @@
language: python
python:
- '2.7'
- '3.5'
- '3.6'
- '3.7'
@@ -17,7 +17,7 @@ is used as a central point of communication between all components.
Modoboa is developed with modularity in mind, expanding it is really
easy. Actually, all current features are extensions.

It is written in Python and uses the `Django
It is written in Python 3 and uses the `Django
<https://www.djangoproject.com>`_, `jQuery <http://jquery.com>`_ and
`Bootstrap <http://getbootstrap.com/>`_
frameworks.
@@ -68,4 +68,4 @@ The following external libraries are provided with Modoboa:
.. |codecov| image:: http://codecov.io/github/modoboa/modoboa/coverage.svg?branch=master
:target: http://codecov.io/github/modoboa/modoboa?branch=master
.. |codacy| image:: https://api.codacy.com/project/badge/Grade/82fd10127ac3468899ca75f04e9862b6
:target: https://www.codacy.com/app/modoboa/modoboa?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=modoboa/modoboa&amp;utm_campaign=Badge_Grade
:target: https://www.codacy.com/app/modoboa/modoboa?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=modoboa/modoboa&amp;utm_campaign=Badge_Grade
@@ -1,7 +1,4 @@
#!/usr/bin/env python
# coding: utf-8

from __future__ import unicode_literals

from modoboa.core.commands import handle_command_line

@@ -50,7 +50,7 @@ This is just one possible configuration.
To use mod_wsgi daemon mode, add the two following directives just
under ``WSGIScriptAlias``::

WSGIDaemonProcess example.com python-path=<modoboa_instance>:<virtualenv path>/lib/python2.7/site-packages
WSGIDaemonProcess example.com python-path=<modoboa_instance>:<virtualenv path>/lib/python3.7/site-packages
WSGIProcessGroup example.com

Replace values between ``<>`` with yours. If you don't use a
@@ -1,9 +1,5 @@
# -*- coding: utf-8 -*-

"""Modoboa - Mail hosting made simple."""

from __future__ import unicode_literals

from pkg_resources import DistributionNotFound, get_distribution

try:
@@ -1,5 +1 @@
# -*- coding: utf-8 -*-

from __future__ import unicode_literals

default_app_config = "modoboa.admin.apps.AdminConfig"
@@ -1,14 +1,10 @@
# -*- coding: utf-8 -*-

"""Admin API."""

from __future__ import unicode_literals

from django import http
from django.contrib.contenttypes.models import ContentType

from rest_framework import filters, status, viewsets
from rest_framework.decorators import detail_route, list_route
from rest_framework.decorators import action
from rest_framework.exceptions import ParseError
from rest_framework.permissions import DjangoModelPermissions, IsAuthenticated
from rest_framework.response import Response
@@ -86,7 +82,7 @@ def get_queryset(self):
queryset = queryset.filter(mailbox__domain__name=domain)
return queryset

@detail_route(methods=["put"])
@action(methods=["put"], detail=True)
def password(self, request, pk=None):
"""Change account password."""
try:
@@ -100,7 +96,7 @@ def password(self, request, pk=None):
return Response(
serializer.errors, status=status.HTTP_400_BAD_REQUEST)

@list_route()
@action(detail=False)
def exists(self, request):
"""Check if account exists.
@@ -1,9 +1,5 @@
# -*- coding: utf-8 -*-

"""Modoboa admin settings."""

from __future__ import unicode_literals

import os

from django import forms
@@ -1,9 +1,5 @@
# -*- coding: utf-8 -*-

"""AppConfig for admin."""

from __future__ import unicode_literals

from django.apps import AppConfig

from .app_settings import load_admin_settings
@@ -1,9 +1,5 @@
# -*- coding: utf-8 -*-

"""Admin constants."""

from __future__ import unicode_literals

from django.utils.translation import ugettext_lazy as _

DNSBL_PROVIDERS = [
@@ -1,11 +1,7 @@
# -*- coding: utf-8 -*-

"""
Fixtures factories.
"""

from __future__ import unicode_literals

import factory

from modoboa.core.factories import PermissionFactory, UserFactory
@@ -1,7 +1,3 @@
# -*- coding: utf-8 -*-

from __future__ import unicode_literals

from .account import (
AccountForm, AccountFormGeneral, AccountFormMail, AccountPermissionsForm,
AccountWizard
@@ -1,9 +1,5 @@
# -*- coding: utf-8 -*-

"""Forms related to accounts management."""

from __future__ import unicode_literals

from collections import OrderedDict
from functools import reduce

@@ -1,9 +1,5 @@
# -*- coding: utf-8 -*-

"""Forms related to aliases management."""

from __future__ import unicode_literals

from collections import OrderedDict

from django import forms
@@ -1,9 +1,5 @@
# -*- coding: utf-8 -*-

"""Forms related to domains management."""

from __future__ import unicode_literals

from functools import reduce

from django import forms
@@ -1,7 +1,3 @@
# -*- coding: utf-8 -*-

from __future__ import unicode_literals

from django import forms
from django.utils.translation import ugettext_lazy

@@ -1,9 +1,5 @@
# -*- coding: utf-8 -*-

"""Forms related to forwards management."""

from __future__ import unicode_literals

from django import forms
from django.core import validators
from django.utils.translation import ugettext_lazy
@@ -1,9 +1,5 @@
# -*- coding: utf-8 -*-

"""Forms related to import operations."""

from __future__ import unicode_literals

from django import forms
from django.utils.translation import ugettext_lazy

@@ -1,9 +1,5 @@
# -*- coding: utf-8 -*-

"""Django signal handlers for admin."""

from __future__ import unicode_literals

from django.contrib.contenttypes.models import ContentType
from django.db.models import signals
from django.dispatch import receiver
@@ -1,9 +1,5 @@
# -*- coding: utf-8 -*-

"""Internal library for admin."""

from __future__ import unicode_literals

import ipaddress
import logging
import random
@@ -1,9 +1,5 @@
# -*- coding: utf-8 -*-

"""A management command to apply mailbox operations."""

from __future__ import print_function, unicode_literals

import logging
import os
import shutil
@@ -1,9 +1,5 @@
# -*- coding: utf-8 -*-

"""Modoboa main management command."""

from __future__ import unicode_literals

from subcommand.base import SubcommandCommand

from .subcommands._export import ExportCommand
@@ -1,24 +1,14 @@
# -*- coding: utf-8 -*-

"""Django management command to export admin objects."""

from __future__ import unicode_literals

import sys
import csv

from django.core.management.base import BaseCommand
from django.utils import six
from django.utils.encoding import smart_text

from modoboa.core.extensions import exts_pool
from modoboa.core.models import User
from .... import models

if six.PY2:
from backports import csv
else:
import csv


class ExportCommand(BaseCommand):
"""Command class."""
@@ -1,9 +1,6 @@
# -*- coding: utf-8 -*-

"""Django management command to import admin objects."""

from __future__ import unicode_literals

import csv
import io
import os

@@ -12,19 +9,13 @@

from django.core.management.base import BaseCommand, CommandError
from django.db import transaction
from django.utils import six
from django.utils.translation import ugettext as _

from modoboa.core import models as core_models
from modoboa.core.extensions import exts_pool
from modoboa.lib.exceptions import Conflict
from .... import signals

if six.PY2:
from backports import csv
else:
import csv


class ImportCommand(BaseCommand):
"""Command class."""
@@ -35,7 +26,7 @@ class ImportCommand(BaseCommand):
def add_arguments(self, parser):
"""Add extra arguments to command."""
parser.add_argument(
"--sepchar", type=six.text_type, default=";",
"--sepchar", type=str, default=";",
help="Separator used in file.")
parser.add_argument(
"--continue-if-exists", action="store_true",
@@ -45,7 +36,7 @@ def add_arguments(self, parser):
"--crypt-password", action="store_true",
default=False, help="Encrypt provided passwords.")
parser.add_argument(
"files", type=six.text_type, nargs="+", help="CSV files to import.")
"files", type=str, nargs="+", help="CSV files to import.")

def _import(self, filename, options, encoding="utf-8"):
"""Import domains or identities."""
@@ -121,10 +112,7 @@ def handle(self, *args, **options):
encoding=detector.result["encoding"]
)
except UnicodeDecodeError as exc:
six.raise_from(
CommandError(
_("Unable to decode CSV file using %(encoding)s "
"encoding") % detector.result
),
exc
)
raise CommandError(
_("Unable to decode CSV file using %(encoding)s "
"encoding") % detector.result
) from exc
@@ -1,9 +1,5 @@
# -*- coding: utf-8 -*-

"""Management command to create DKIM keys."""

from __future__ import print_function, unicode_literals

import os

from django.core.management.base import BaseCommand
@@ -1,9 +1,5 @@
# -*- coding: utf-8 -*-

"""Management command to check defined domains."""

from __future__ import print_function, unicode_literals

import ipaddress

import gevent
@@ -1,9 +1,5 @@
# -*- coding: utf-8 -*-

"""Management command to check and fix known problems."""

from __future__ import print_function, unicode_literals

from django.conf import settings
from django.core.management.base import BaseCommand
from django.utils.encoding import smart_str
@@ -1,6 +1,3 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django.db import models, migrations
from django.conf import settings

@@ -1,6 +1,3 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django.db import models, migrations


@@ -1,6 +1,3 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django.db import migrations, models


@@ -1,7 +1,4 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.9.9 on 2016-09-14 09:07
from __future__ import unicode_literals

from django.db import migrations, models
import django.db.models.deletion

@@ -1,7 +1,4 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.9.5 on 2016-10-26 08:03
from __future__ import unicode_literals

from django.db import migrations, models


0 comments on commit 4fb6147

Please sign in to comment.
You can’t perform that action at this time.