Mercurial > public > mercurial-scm > hg-stable
diff mercurial/scmposix.py @ 30646:16b5df5792a8
py3: replace sys.platform with pycompat.sysplatform (part 1 of 2)
sys.platform returns unicode on python 3 world. Our code base has most of the
things bytes because of the transformer. So we have a bytes version of this as
pycompat.sysplatform. This series of 2 patches replaces occurences of
sys.platform with pycompat.sysplatform.
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Mon, 19 Dec 2016 02:15:24 +0530 |
parents | 5b0baa9f3362 |
children | 354020079723 |
line wrap: on
line diff
--- a/mercurial/scmposix.py Mon Dec 19 00:28:12 2016 +0530 +++ b/mercurial/scmposix.py Mon Dec 19 02:15:24 2016 +0530 @@ -25,7 +25,7 @@ def systemrcpath(): path = [] - if sys.platform == 'plan9': + if pycompat.sysplatform == 'plan9': root = 'lib/mercurial' else: root = 'etc/mercurial' @@ -38,7 +38,7 @@ return path def userrcpath(): - if sys.platform == 'plan9': + if pycompat.sysplatform == 'plan9': return [encoding.environ['home'] + '/lib/hgrc'] else: return [os.path.expanduser('~/.hgrc')]