diff options
Diffstat (limited to 'ranger/ext/shutil_generatorized.py')
-rw-r--r-- | ranger/ext/shutil_generatorized.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ranger/ext/shutil_generatorized.py b/ranger/ext/shutil_generatorized.py index b990aded..8c5fc805 100644 --- a/ranger/ext/shutil_generatorized.py +++ b/ranger/ext/shutil_generatorized.py @@ -34,7 +34,7 @@ except NameError: def copyfileobj(fsrc, fdst, length=BLOCK_SIZE): """copy data from file-like object fsrc to file-like object fdst""" done = 0 - while 1: + while True: buf = fsrc.read(length) if not buf: break @@ -198,14 +198,14 @@ def copytree(src, dst, symlinks=False, ignore=None, overwrite=False): elif os.path.isdir(srcname): d = 0 for d in copytree(srcname, dstname, symlinks, - ignore, overwrite): + ignore, overwrite): yield done + d done += d else: # Will raise a SpecialFileError for unsupported file types d = 0 for d in copy2(srcname, dstname, - overwrite=overwrite, symlinks=symlinks): + overwrite=overwrite, symlinks=symlinks): yield done + d done += d # catch the Error from the recursive copytree so that we can |