summary refs log tree commit diff stats
path: root/ranger/ext/shutil_generatorized.py
diff options
context:
space:
mode:
Diffstat (limited to 'ranger/ext/shutil_generatorized.py')
-rw-r--r--ranger/ext/shutil_generatorized.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/ranger/ext/shutil_generatorized.py b/ranger/ext/shutil_generatorized.py
index 436d2cb7..72b8dc26 100644
--- a/ranger/ext/shutil_generatorized.py
+++ b/ranger/ext/shutil_generatorized.py
@@ -11,10 +11,11 @@ import sys
 import stat
 from os.path import abspath
 
-__all__ = ["copyfileobj","copyfile","copystat","copy2",
+__all__ = ["copyfileobj","copyfile","copystat","copy2","BLOCK_SIZE",
            "copytree","move","rmtree","Error", "SpecialFileError"]
 
 APPENDIX = '_'
+BLOCK_SIZE = 16 * 1024
 
 class Error(EnvironmentError):
     pass
@@ -28,7 +29,7 @@ try:
 except NameError:
     WindowsError = None
 
-def copyfileobj(fsrc, fdst, length=16*1024):
+def copyfileobj(fsrc, fdst, length=BLOCK_SIZE):
     """copy data from file-like object fsrc to file-like object fdst"""
     while 1:
         buf = fsrc.read(length)