Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/util_win32.py @ 2448:b77a2ef61b81
replace os.stat with os.lstat in some where.
author | Vadim Gelfer <vadim.gelfer@gmail.com> |
---|---|
date | Fri, 16 Jun 2006 12:58:24 -0700 |
parents | a600d9997521 |
children | e6a41cbaa260 |
comparison
equal
deleted
inserted
replaced
2447:cd00531ecc16 | 2448:b77a2ef61b81 |
---|---|
160 None, win32file.OPEN_EXISTING, 0, None) | 160 None, win32file.OPEN_EXISTING, 0, None) |
161 res = win32file.GetFileInformationByHandle(fh) | 161 res = win32file.GetFileInformationByHandle(fh) |
162 fh.Close() | 162 fh.Close() |
163 return res[7] | 163 return res[7] |
164 except pywintypes.error: | 164 except pywintypes.error: |
165 return os.stat(pathname).st_nlink | 165 return os.lstat(pathname).st_nlink |
166 | 166 |
167 def testpid(pid): | 167 def testpid(pid): |
168 '''return True if pid is still running or unable to | 168 '''return True if pid is still running or unable to |
169 determine, False otherwise''' | 169 determine, False otherwise''' |
170 try: | 170 try: |