[issue1309] two stat in osutil.py

weijun mercurial-bugs at selenic.com
Wed Sep 24 03:48:31 CDT 2008


New submission from weijun <weijun.wang at sun.com>:

There are 2 identifiers in osutil.py named "stat". First is the imported module
name, second is the optional parameter of the listdir method. This gets me
errors like --

  File "/work/hg/mercurial/dirstate.py", line 516, in walk
    entries = listdir(join(nd), stat=True, skip ='.hg')
  File "/work/hg/mercurial/osutil.py", line 33, in listdir
    if fn == skip and stat.S_ISDIR(st.st_mode):
AttributeError: 'bool' object has no attribute 'S_ISDIR'

I've included a patch.

----------
files: patch
messages: 7194
nosy: weijun
priority: bug
status: unread
title: two stat in osutil.py

____________________________________________________
Mercurial issue tracker <mercurial-bugs at selenic.com>
<http://www.selenic.com/mercurial/bts/issue1309>
____________________________________________________
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch
Type: application/octet-stream
Size: 1208 bytes
Desc: not available
Url : http://selenic.com/pipermail/mercurial-devel/attachments/20080924/3b8fe9ae/attachment.obj 


More information about the Mercurial-devel mailing list