Fixed TypeError when running ponysay --altlist.

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.
This commit is contained in:
Michael Schwarz 2014-08-30 12:21:44 +02:00
parent cc9a4f4324
commit 5125dd6400

View file

@ -140,7 +140,7 @@ def linklist(ponydirs = None, quoters = [], ucsiser = None):
for ponydir in ponydirs: # Loop ponydirs
## Get all pony files in the directory
ponies = _get_file_list(ponydirs, '.pony')
ponies = _get_file_list(ponydir, '.pony')
## If there are no ponies in the directory skip to next directory, otherwise, print the directories name
if len(ponies) == 0: