X-Git-Url: https://git.mxchange.org/?p=quix0rs-apt-p2p.git;a=blobdiff_plain;f=const.py;fp=const.py;h=bade7c418cb458302cf69dc795f022a238d7d9c0;hp=ee1da1fc0d0d4ec46d3973fb460db9ffd394679c;hb=67ea324e46570a42861fe6a342c626738134bbfc;hpb=c030f4d75c42e44eb874508016ee59d6800e9505;ds=sidebyside diff --git a/const.py b/const.py index ee1da1f..bade7c4 100644 --- a/const.py +++ b/const.py @@ -1,9 +1,16 @@ from twisted.internet.default import SelectReactor ## twistedmatrix.com reactor = SelectReactor(installSignalHandlers=0) + from twisted.internet import main main.installReactor(reactor) +try: + import twisted.names.client + reactor.installResolver(twisted.names.client.theResolver) +except IOError: + print "no resolv.conf!" + # magic id to use before we know a peer's id NULL_ID = 20 * '\0'