From 5125dd6400ca89a64f536be824a1de905f8a0920 Mon Sep 17 00:00:00 2001 From: Michael Schwarz Date: Sat, 30 Aug 2014 12:21:44 +0200 Subject: [PATCH] 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 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. --- src/lists.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lists.py b/src/lists.py index dd7b7fa7..b3e8a56e 100755 --- a/src/lists.py +++ b/src/lists.py @@ -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: