Skip to content

os.fwalk is not available on Mac OSX, consider falling back to os.walk #12

Description

@arthurjy

On Mac OSX with Python 3.5.2, script fails with error:

Traceback (most recent call last):
  File "DapGen.py", line 411, in <module>
    sys.exit(main())
  File "DapGen.py", line 368, in main
    ml = MediaLocation(inpath)
  File "DapGen.py", line 92, in __init__
    for root, dirs, files, rootfd in os.fwalk(self.topdir):
AttributeError: module 'os' has no attribute 'fwalk'

For some reason os.fwalk is not available. Not 100% why, core os.py seems to not define it because this is not true:
if {open, stat} <= supports_dir_fd and {listdir, stat} <= supports_fd:

For kmel_db, consider falling back to using os.walk instead and removing use of directory file descriptor in such instances.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions