##// END OF EJS Templates
zeroconf: use absolute_import
timeless -
r28296:a73394e7 default
parent child Browse files
Show More
@@ -1,4 +1,4
1 from __future__ import print_function
1 from __future__ import absolute_import, print_function
2
2
3 """ Multicast DNS Service Discovery for Python, v0.12
3 """ Multicast DNS Service Discovery for Python, v0.12
4 Copyright (C) 2003, Paul Scott-Murphy
4 Copyright (C) 2003, Paul Scott-Murphy
@@ -80,12 +80,12 from __future__ import print_function
80 __email__ = "paul at scott dash murphy dot com"
80 __email__ = "paul at scott dash murphy dot com"
81 __version__ = "0.12"
81 __version__ = "0.12"
82
82
83 import select
84 import socket
83 import string
85 import string
84 import time
85 import struct
86 import struct
86 import socket
87 import threading
87 import threading
88 import select
88 import time
89 import traceback
89 import traceback
90
90
91 __all__ = ["Zeroconf", "ServiceInfo", "ServiceBrowser"]
91 __all__ = ["Zeroconf", "ServiceInfo", "ServiceBrowser"]
@@ -763,8 +763,8 class DNSOutgoing(object):
763 self.finished = 1
763 self.finished = 1
764 for question in self.questions:
764 for question in self.questions:
765 self.writeQuestion(question)
765 self.writeQuestion(question)
766 for answer, time in self.answers:
766 for answer, time_ in self.answers:
767 self.writeRecord(answer, time)
767 self.writeRecord(answer, time_)
768 for authority in self.authorities:
768 for authority in self.authorities:
769 self.writeRecord(authority, 0)
769 self.writeRecord(authority, 0)
770 for additional in self.additionals:
770 for additional in self.additionals:
@@ -868,9 +868,9 class Engine(threading.Thread):
868 else:
868 else:
869 try:
869 try:
870 rr, wr, er = select.select(rs, [], [], self.timeout)
870 rr, wr, er = select.select(rs, [], [], self.timeout)
871 for socket in rr:
871 for sock in rr:
872 try:
872 try:
873 self.readers[socket].handle_read()
873 self.readers[sock].handle_read()
874 except Exception:
874 except Exception:
875 if not globals()['_GLOBAL_DONE']:
875 if not globals()['_GLOBAL_DONE']:
876 traceback.print_exc()
876 traceback.print_exc()
@@ -4,7 +4,6
4 #
4 #
5 # This software may be used and distributed according to the terms of the
5 # This software may be used and distributed according to the terms of the
6 # GNU General Public License version 2 or any later version.
6 # GNU General Public License version 2 or any later version.
7
8 '''discover and advertise repositories on the local network
7 '''discover and advertise repositories on the local network
9
8
10 Zeroconf-enabled repositories will be announced in a network without
9 Zeroconf-enabled repositories will be announced in a network without
@@ -23,13 +22,23 You can discover Zeroconf-enabled reposi
23 $ hg paths
22 $ hg paths
24 zc-test = http://example.com:8000/test
23 zc-test = http://example.com:8000/test
25 '''
24 '''
25 from __future__ import absolute_import
26
26
27 import socket, time, os
27 import os
28 import socket
29 import time
28
30
29 import Zeroconf
31 from . import Zeroconf
30 from mercurial import ui, hg, encoding, dispatch
32 from mercurial import (
31 from mercurial import extensions
33 dispatch,
32 from mercurial.hgweb import server as servermod
34 encoding,
35 extensions,
36 hg,
37 ui,
38 )
39 from mercurial.hgweb import (
40 server as servermod
41 )
33
42
34 # Note for extension authors: ONLY specify testedwith = 'internal' for
43 # Note for extension authors: ONLY specify testedwith = 'internal' for
35 # extensions which SHIP WITH MERCURIAL. Non-mainline extensions should
44 # extensions which SHIP WITH MERCURIAL. Non-mainline extensions should
@@ -86,8 +86,6
86 hgext/transplant.py not using absolute_import
86 hgext/transplant.py not using absolute_import
87 hgext/win32mbcs.py not using absolute_import
87 hgext/win32mbcs.py not using absolute_import
88 hgext/win32text.py not using absolute_import
88 hgext/win32text.py not using absolute_import
89 hgext/zeroconf/Zeroconf.py not using absolute_import
90 hgext/zeroconf/__init__.py not using absolute_import
91 i18n/check-translation.py not using absolute_import
89 i18n/check-translation.py not using absolute_import
92 i18n/polib.py not using absolute_import
90 i18n/polib.py not using absolute_import
93 mercurial/cmdutil.py not using absolute_import
91 mercurial/cmdutil.py not using absolute_import
General Comments 0
You need to be logged in to leave comments. Login now