##// END OF EJS Templates
py3: hack around inconsistency of type of name passed to DNSQuestion...
Pulkit Goyal -
r42754:8306b6c2 default
parent child Browse files
Show More
@@ -518,6 +518,7 b' test-pathconflicts-basic.t'
518 test-pathconflicts-merge.t
518 test-pathconflicts-merge.t
519 test-pathconflicts-update.t
519 test-pathconflicts-update.t
520 test-pathencode.py
520 test-pathencode.py
521 test-paths.t
521 test-pending.t
522 test-pending.t
522 test-permissions.t
523 test-permissions.t
523 test-phabricator.t
524 test-phabricator.t
@@ -89,6 +89,8 b' import threading'
89 import time
89 import time
90 import traceback
90 import traceback
91
91
92 from mercurial import pycompat
93
92 __all__ = ["Zeroconf", "ServiceInfo", "ServiceBrowser"]
94 __all__ = ["Zeroconf", "ServiceInfo", "ServiceBrowser"]
93
95
94 # hook for threads
96 # hook for threads
@@ -270,6 +272,8 b' class DNSQuestion(DNSEntry):'
270 """A DNS question entry"""
272 """A DNS question entry"""
271
273
272 def __init__(self, name, type, clazz):
274 def __init__(self, name, type, clazz):
275 if pycompat.ispy3 and isinstance(name, str):
276 name = name.encode('ascii')
273 if not name.endswith(".local."):
277 if not name.endswith(".local."):
274 raise NonLocalNameException(name)
278 raise NonLocalNameException(name)
275 DNSEntry.__init__(self, name, type, clazz)
279 DNSEntry.__init__(self, name, type, clazz)
General Comments 0
You need to be logged in to leave comments. Login now