Skip to content

Commit

Permalink
Fix a py2 compat issue with import queue
Browse files Browse the repository at this point in the history
Use six to abstract the queue/Queue naming difference.
  • Loading branch information
cvaroqui committed Jun 6, 2023
1 parent 8a71ee7 commit 95c3cc9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion opensvc/daemon/dns.py
Expand Up @@ -7,7 +7,6 @@
import logging
import os
import pwd
import queue
import re
import select
import socket
Expand All @@ -28,8 +27,10 @@
PTR6_SUFFIX = ".ip6.arpa."

if six.PY2:
import Queue as queue
MAKEFILE_KWARGS = {"bufsize": 0}
else:
import queue
MAKEFILE_KWARGS = {"buffering": None}

def record(qtype, qname, content, ttl=60):
Expand Down

0 comments on commit 95c3cc9

Please sign in to comment.