comparison mercurial/hgweb/server.py @ 34645:75979c8d4572

codemod: use pycompat.iswindows This is done by: sed -i "s/pycompat\.osname == 'nt'/pycompat.iswindows/" **/*.py sed -i "s/pycompat\.osname != 'nt'/not pycompat.iswindows/" **/*.py sed -i 's/pycompat.osname == "nt"/pycompat.iswindows/' **/*.py Differential Revision: https://phab.mercurial-scm.org/D1034
author Jun Wu <quark@fb.com>
date Thu, 12 Oct 2017 23:30:46 -0700
parents 482d6f6dba91
children 8e5132ece156
comparison
equal deleted inserted replaced
34644:c0a6c19690ff 34645:75979c8d4572
264 return default 264 return default
265 265
266 class MercurialHTTPServer(_mixin, httpservermod.httpserver, object): 266 class MercurialHTTPServer(_mixin, httpservermod.httpserver, object):
267 267
268 # SO_REUSEADDR has broken semantics on windows 268 # SO_REUSEADDR has broken semantics on windows
269 if pycompat.osname == 'nt': 269 if pycompat.iswindows:
270 allow_reuse_address = 0 270 allow_reuse_address = 0
271 271
272 def __init__(self, ui, app, addr, handler, **kwargs): 272 def __init__(self, ui, app, addr, handler, **kwargs):
273 httpservermod.httpserver.__init__(self, addr, handler, **kwargs) 273 httpservermod.httpserver.__init__(self, addr, handler, **kwargs)
274 self.daemon_threads = True 274 self.daemon_threads = True