Skip to content

Commit

Permalink
if on python 3, always use our own copy of _asyncore.py and _asynchat.py
Browse files Browse the repository at this point in the history
  • Loading branch information
giampaolo committed Jun 20, 2024
1 parent 23a4658 commit e2e2961
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pyftpdlib/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
from .log import logger


if sys.version_info[:2] >= (3, 12):
if PY3:
from . import _asynchat as asynchat
else:
import asynchat
Expand Down
4 changes: 3 additions & 1 deletion pyftpdlib/ioloop.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ def handle_accepted(self, sock, addr):
import time
import traceback

from ._compat import PY3


try:
import threading
Expand All @@ -78,7 +80,7 @@ def handle_accepted(self, sock, addr):
from .log import logger


if sys.version_info[:2] >= (3, 12):
if PY3:
from . import _asynchat as asynchat
from . import _asyncore as asyncore
else:
Expand Down

0 comments on commit e2e2961

Please sign in to comment.