Skip to content

Commit

Permalink
Python 3: types.StringType -> str
Browse files Browse the repository at this point in the history
  • Loading branch information
mgedmin committed Oct 21, 2017
1 parent 2083508 commit fd0030e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions src/zope/server/ftp/tests/test_ftpserver.py
Expand Up @@ -21,7 +21,6 @@
import traceback
import unittest

from types import StringType
from threading import Thread, Event

try:
Expand Down Expand Up @@ -172,7 +171,7 @@ def execute(self, commands, login=1):
ftp = self.getFTPConnection(login)

try:
if type(commands) is StringType:
if isinstance(commands, str):
commands = (commands,)

for command in commands:
Expand Down
3 changes: 1 addition & 2 deletions src/zope/server/logger/filelogger.py
Expand Up @@ -13,7 +13,6 @@
##############################################################################
"""File Logger
"""
from types import StringType

from zope.server.interfaces.logger import IMessageLogger
from zope.interface import implementer
Expand All @@ -25,7 +24,7 @@ class FileLogger(object):

def __init__(self, file, flush=1, mode='a'):
"""pass this either a path or a file object."""
if type(file) is StringType:
if isinstance(file, str):
if (file == '-'):
import sys
self.file = sys.stdout
Expand Down

0 comments on commit fd0030e

Please sign in to comment.