Remove remaining Python 2 compatibility code.
This commit is contained in:
parent
9bf3bc1944
commit
f0d57e3bd8
@ -1,16 +0,0 @@
|
|||||||
import functools
|
|
||||||
import warnings
|
|
||||||
|
|
||||||
from email.mime.text import MIMEText
|
|
||||||
|
|
||||||
|
|
||||||
def encode_to_utf8(method):
|
|
||||||
def wrapper(self):
|
|
||||||
return method(self)
|
|
||||||
functools.update_wrapper(wrapper, method, ['__name__', '__doc__'])
|
|
||||||
return wrapper
|
|
||||||
|
|
||||||
|
|
||||||
# based on django.utils.encoding.python_2_unicode_compatible
|
|
||||||
def py2_unicode(klass):
|
|
||||||
return klass
|
|
@ -31,11 +31,6 @@ except ImportError:
|
|||||||
SKIP_AUDIO = True
|
SKIP_AUDIO = True
|
||||||
SKIP_VIDEO = True
|
SKIP_VIDEO = True
|
||||||
|
|
||||||
try:
|
|
||||||
import scikits.audiolab
|
|
||||||
except ImportError:
|
|
||||||
SKIP_AUDIO = True
|
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import pytest
|
import pytest
|
||||||
import webtest.forms
|
import webtest.forms
|
||||||
|
@ -15,12 +15,12 @@
|
|||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
|
||||||
|
from email.mime.text import MIMEText
|
||||||
import socket
|
import socket
|
||||||
import logging
|
import logging
|
||||||
import smtplib
|
import smtplib
|
||||||
import sys
|
import sys
|
||||||
from mediagoblin import mg_globals, messages
|
from mediagoblin import mg_globals, messages
|
||||||
from mediagoblin._compat import MIMEText
|
|
||||||
from mediagoblin.tools import common
|
from mediagoblin.tools import common
|
||||||
|
|
||||||
### ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
### ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
@ -18,13 +18,10 @@ import os
|
|||||||
import shutil
|
import shutil
|
||||||
import tempfile
|
import tempfile
|
||||||
|
|
||||||
from mediagoblin._compat import py2_unicode
|
|
||||||
|
|
||||||
# Actual workbench stuff
|
# Actual workbench stuff
|
||||||
# ----------------------
|
# ----------------------
|
||||||
|
|
||||||
|
|
||||||
@py2_unicode
|
|
||||||
class Workbench:
|
class Workbench:
|
||||||
"""
|
"""
|
||||||
Represent the directory for the workbench
|
Represent the directory for the workbench
|
||||||
|
Loading…
x
Reference in New Issue
Block a user