summaryrefslogtreecommitdiff
path: root/fs/utils.py
diff options
context:
space:
mode:
authorwillmcgugan <willmcgugan@67cdc799-7952-0410-af00-57a81ceafa0f>2010-06-18 18:53:33 +0000
committerwillmcgugan <willmcgugan@67cdc799-7952-0410-af00-57a81ceafa0f>2010-06-18 18:53:33 +0000
commit19696151ea23abb97efdf81a1bcd94e36e66a1bc (patch)
tree610dd8ac9a9f0453a59c0652c5d5dca59617b0c7 /fs/utils.py
parent9c7e2efa2193e78cb629f23e9eb130614e8ac800 (diff)
downloadpyfilesystem-19696151ea23abb97efdf81a1bcd94e36e66a1bc.tar.gz
Mostly doc changes, and some pedantic pep-8 tweaks
git-svn-id: http://pyfilesystem.googlecode.com/svn/trunk@364 67cdc799-7952-0410-af00-57a81ceafa0f
Diffstat (limited to 'fs/utils.py')
-rw-r--r--fs/utils.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/fs/utils.py b/fs/utils.py
index 9120dc1..b17e636 100644
--- a/fs/utils.py
+++ b/fs/utils.py
@@ -181,7 +181,7 @@ def find_duplicates(fs,
other attributes not take in to account).
:param fs: A filesystem object
- :param compare_paths: An iterable of paths within the FS object, or all files if omited
+ :param compare_paths: An iterable of paths within the FS object, or all files if omitted
:param quick: If set to True, the quick method of finding duplicates will be used, which can potentially return false positives if the files have the same size and start with the same data. Do not use when deleting files!
:param signature_chunk_size: The number of bytes to read before generating a signature checksum value
:param signature_size: The total number of bytes read to generate a signature
@@ -281,7 +281,7 @@ def find_duplicates(fs,
paths = list(set(paths).difference(dups))
-def print_fs(fs, path='/', max_levels=5, file_out=sys.stdout, terminal_colors=None):
+def print_fs(fs, path='/', max_levels=5, file_out=None, terminal_colors=None):
"""Prints a filesystem listing to stdout (including sub dirs). Useful as a debugging aid.
Be careful about printing a OSFS, or any other large filesystem.
Without max_levels set, this function will traverse the entire directory tree.
@@ -303,6 +303,9 @@ def print_fs(fs, path='/', max_levels=5, file_out=sys.stdout, terminal_colors=No
"""
+ if file_out is None:
+ file_out = sys.stdout
+
if terminal_colors is None:
if sys.platform == 'win32':
terminal_colors = False