equal
deleted
inserted
replaced
565 return st and stat.S_ISLNK(st.st_mode) |
565 return st and stat.S_ISLNK(st.st_mode) |
566 |
566 |
567 def statisexec(st): |
567 def statisexec(st): |
568 '''check whether a stat result is an executable file''' |
568 '''check whether a stat result is an executable file''' |
569 return st and (st.st_mode & 0100 != 0) |
569 return st and (st.st_mode & 0100 != 0) |
|
570 |
|
571 def readpipe(pipe): |
|
572 """Read all available data from a pipe.""" |
|
573 chunks = [] |
|
574 while True: |
|
575 size = os.fstat(pipe.fileno()).st_size |
|
576 if not size: |
|
577 break |
|
578 |
|
579 s = pipe.read(size) |
|
580 if not s: |
|
581 break |
|
582 chunks.append(s) |