Mercurial > hg
comparison mercurial/subrepo.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 | a150173da1c1 |
children | 0fbb3a5c188e |
comparison
equal
deleted
inserted
replaced
30638:1c5cbf28f007 | 30639:d524c88511a7 |
---|---|
1311 except OSError as e: | 1311 except OSError as e: |
1312 genericerror = _("error executing git for subrepo '%s': %s") | 1312 genericerror = _("error executing git for subrepo '%s': %s") |
1313 notfoundhint = _("check git is installed and in your PATH") | 1313 notfoundhint = _("check git is installed and in your PATH") |
1314 if e.errno != errno.ENOENT: | 1314 if e.errno != errno.ENOENT: |
1315 raise error.Abort(genericerror % (self._path, e.strerror)) | 1315 raise error.Abort(genericerror % (self._path, e.strerror)) |
1316 elif os.name == 'nt': | 1316 elif pycompat.osname == 'nt': |
1317 try: | 1317 try: |
1318 self._gitexecutable = 'git.cmd' | 1318 self._gitexecutable = 'git.cmd' |
1319 out, err = self._gitnodir(['--version']) | 1319 out, err = self._gitnodir(['--version']) |
1320 except OSError as e2: | 1320 except OSError as e2: |
1321 if e2.errno == errno.ENOENT: | 1321 if e2.errno == errno.ENOENT: |