diff mercurial/subrepo.py @ 30644: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 a150173da1c1
children 0fbb3a5c188e
line wrap: on
line diff
--- a/mercurial/subrepo.py	Sun Dec 18 02:08:59 2016 +0530
+++ b/mercurial/subrepo.py	Mon Dec 19 00:16:52 2016 +0530
@@ -1313,7 +1313,7 @@
             notfoundhint = _("check git is installed and in your PATH")
             if e.errno != errno.ENOENT:
                 raise error.Abort(genericerror % (self._path, e.strerror))
-            elif os.name == 'nt':
+            elif pycompat.osname == 'nt':
                 try:
                     self._gitexecutable = 'git.cmd'
                     out, err = self._gitnodir(['--version'])