9644:9875d5f11cbf | 9645:31aaa11672d3 |
---|---|
464 ".jedi", | 464 ".jedi", |
465 ] | 465 ] |
466 if ignore is not None: | 466 if ignore is not None: |
467 ignoreList.extend(ignore) | 467 ignoreList.extend(ignore) |
468 | 468 |
469 # TODO: replace os.listdir() with os.scandir() | |
469 try: | 470 try: |
470 entries = os.listdir(path) | 471 entries = os.listdir(path) |
471 for entry in entries: | 472 for entry in entries: |
472 if checkStop and checkStop(): | 473 if checkStop and checkStop(): |
473 break | 474 break |
505 | 506 |
506 @param path root of the tree to check | 507 @param path root of the tree to check |
507 @param excludeDirs basename of directories to ignore | 508 @param excludeDirs basename of directories to ignore |
508 @return list of all directories found | 509 @return list of all directories found |
509 """ | 510 """ |
511 # TODO: replace os.listdir() with os.scandir() | |
510 try: | 512 try: |
511 names = os.listdir(path) | 513 names = os.listdir(path) |
512 except OSError: | 514 except OSError: |
513 return [] | 515 return [] |
514 | 516 |