summaryrefslogtreecommitdiff
path: root/fs/utils.py
diff options
context:
space:
mode:
authorwillmcgugan <willmcgugan@67cdc799-7952-0410-af00-57a81ceafa0f>2010-06-19 19:33:54 +0000
committerwillmcgugan <willmcgugan@67cdc799-7952-0410-af00-57a81ceafa0f>2010-06-19 19:33:54 +0000
commite3434f28757bfbe8ce0f35d1fafc14567089fb76 (patch)
treee78b01aad9f5b3c7ca94ce44669200cc3e08c57a /fs/utils.py
parentd728c3ea3e74f2d8cedb4904ab436e1c118bc311 (diff)
downloadpyfilesystem-e3434f28757bfbe8ce0f35d1fafc14567089fb76.tar.gz
Fixed a bug when using print_fs to a file without an encoding value
git-svn-id: http://pyfilesystem.googlecode.com/svn/trunk@367 67cdc799-7952-0410-af00-57a81ceafa0f
Diffstat (limited to 'fs/utils.py')
-rw-r--r--fs/utils.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/utils.py b/fs/utils.py
index b17e636..83ad832 100644
--- a/fs/utils.py
+++ b/fs/utils.py
@@ -313,7 +313,7 @@ def print_fs(fs, path='/', max_levels=5, file_out=None, terminal_colors=None):
terminal_colors = True
def write(line):
- file_out.write(line.encode(file_out.encoding)+'\n')
+ file_out.write(line.encode(file_out.encoding or 'utf-8')+'\n')
def wrap_prefix(prefix):
if not terminal_colors: