Mercurial > hg
diff mercurial/hgweb/server.py @ 30639:d524c88511a7
py3: replace os.name with pycompat.osname (part 1 of 2)
os.name returns unicodes on py3 and we have pycompat.osname which returns
bytes. This series of 2 patches will change every ocurrence of os.name with
pycompat.osname.
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Mon, 19 Dec 2016 00:16:52 +0530 |
parents | dd3dd80fca10 |
children | ac96ff471c9a |
line wrap: on
line diff
--- a/mercurial/hgweb/server.py Sun Dec 18 02:08:59 2016 +0530 +++ b/mercurial/hgweb/server.py Mon Dec 19 00:16:52 2016 +0530 @@ -18,6 +18,7 @@ from .. import ( error, + pycompat, util, ) @@ -266,7 +267,7 @@ class MercurialHTTPServer(_mixin, httpservermod.httpserver, object): # SO_REUSEADDR has broken semantics on windows - if os.name == 'nt': + if pycompat.osname == 'nt': allow_reuse_address = 0 def __init__(self, ui, app, addr, handler, **kwargs):