Skip to content
Commit 0d239341 authored by Peter van Dijk's avatar Peter van Dijk Committed by Lucas De Marchi
Browse files

only parse regular, non-empty files

I have unix sockets sitting in my source dir:

$ ls -al /home/vagrant/pdns/pdns/pdns.controlsocket
srwxr-xr-x 1 root root 0 Jul 23 14:58 /home/vagrant/pdns/pdns/pdns.controlsocket
This makes codespell abort:

$ ./codespell.py -s ~/pdns
[...]
Traceback (most recent call last):
  File "./codespell.py", line 527, in <module>
    sys.exit(main(*sys.argv))
  File "./codespell.py", line 516, in main
    parse_file(os.path.join(root, file), colors, summary)
  File "./codespell.py", line 378, in parse_file
    if not istextfile(filename):
  File "./codespell.py", line 298, in istextfile
    with open(filename, mode='rb') as f:
IOError: [Errno 6] No such device or address: '/home/vagrant/pdns/pdns/pdns.controlsocket'
parent a032ae03
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment