mirror of
https://github.com/jwinterm/modoboa.git
synced 2026-10-17 05:41:25 +02:00
make deploy command work in both python2 and python3
This commit is contained in:
@@ -13,6 +13,7 @@ from django.forms.fields import Field
|
||||
from django.forms.widgets import RadioSelect
|
||||
from django.forms.widgets import RadioChoiceInput
|
||||
from django.shortcuts import render
|
||||
from django.utils import six
|
||||
from django.utils.encoding import force_text
|
||||
from django.utils.html import conditional_escape
|
||||
from django.utils.safestring import mark_safe
|
||||
@@ -21,7 +22,11 @@ from django.utils.translation import ugettext as _, ugettext_lazy
|
||||
from modoboa.lib.exceptions import BadRequest
|
||||
from modoboa.lib.web_utils import render_to_json_response
|
||||
|
||||
ABC = abc.ABCMeta(b"ABC", (object,), {}) # compatible with Python 2 *and* 3
|
||||
if six.PY2:
|
||||
meta_name = b"ABC"
|
||||
else:
|
||||
meta_name = "ABC"
|
||||
ABC = abc.ABCMeta(meta_name, (object,), {}) # compatible with Python 2 *and* 3
|
||||
|
||||
|
||||
class WizardStep(object):
|
||||
|
||||
Reference in New Issue
Block a user