diff -r a150173da1c1 -r f1c9fafcbf46 mercurial/hgweb/common.py --- a/mercurial/hgweb/common.py Sun Dec 18 01:46:39 2016 +0530 +++ b/mercurial/hgweb/common.py Sun Dec 18 01:54:36 2016 +0530 @@ -13,6 +13,7 @@ import os from .. import ( + encoding, pycompat, util, ) @@ -191,7 +192,7 @@ """ return (config("web", "contact") or config("ui", "username") or - os.environ.get("EMAIL") or "") + encoding.environ.get("EMAIL") or "") def caching(web, req): tag = 'W/"%s"' % web.mtime