Traceback (most recent call last):
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/runpy.py", line 170, in _run_module_as_main
"__main__", mod_spec)
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "./venv/bin/ponysay/__main__.py", line 154, in <module>
File "./venv/bin/ponysay/ponysay.py", line 252, in run
File "./venv/bin/ponysay/ponysay.py", line 753, in linklist
File "./venv/bin/ponysay/lists.py", line 143, in linklist
File "./venv/bin/ponysay/lists.py", line 104, in _get_file_list
TypeError: listdir: illegal type for path parameter
This bug was introduced in this commit:
list.py: Extracted duplicate code for listing files in a directory into a utility function.
Traceback (most recent call last):
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/runpy.py", line 170, in _run_module_as_main
"__main__", mod_spec)
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "venv/bin/ponysay/__main__.py", line 154, in <module>
File "venv/bin/ponysay/ponysay.py", line 248, in run
File "venv/bin/ponysay/ponysay.py", line 765, in onelist
File "venv/bin/ponysay/lists.py", line 210, in onelist
File "venv/bin/ponysay/lists.py", line 210, in <listcomp>
File "venv/bin/ponysay/lists.py", line 104, in _get_file_list
TypeError: listdir: illegal type for path parameter
This bug was introduced in this commit:
list.py: Extracted duplicate code for listing files in a directory into a utility function.
I fixed the problem by removing the requirement for lists.onelist() to accept None for directory lists that should not be searched.
- Split up into functions for distributing the items into columns and actual formatting and printing of the columns.
- Fixes printing when console is narrower than the longest name.