Mercurial > public > mercurial-scm > hg
comparison mercurial/pure/osutil.py @ 9031:3b76321aa0de
compat: use open() instead of file() everywhere
author | Alejandro Santos <alejolp@alejolp.com> |
---|---|
date | Sun, 05 Jul 2009 11:01:30 +0200 |
parents | b6d0fa8c7685 |
children | 25e572394f5c |
comparison
equal
deleted
inserted
replaced
9030:3f56055ff1d7 | 9031:3b76321aa0de |
---|---|
6 # GNU General Public License version 2, incorporated herein by reference. | 6 # GNU General Public License version 2, incorporated herein by reference. |
7 | 7 |
8 import os | 8 import os |
9 import stat as _stat | 9 import stat as _stat |
10 | 10 |
11 posixfile = file | 11 posixfile = open |
12 | 12 |
13 def _mode_to_kind(mode): | 13 def _mode_to_kind(mode): |
14 if _stat.S_ISREG(mode): return _stat.S_IFREG | 14 if _stat.S_ISREG(mode): return _stat.S_IFREG |
15 if _stat.S_ISDIR(mode): return _stat.S_IFDIR | 15 if _stat.S_ISDIR(mode): return _stat.S_IFDIR |
16 if _stat.S_ISLNK(mode): return _stat.S_IFLNK | 16 if _stat.S_ISLNK(mode): return _stat.S_IFLNK |