diff options
author | daviddavid <geiger.david68210@gmail.com> | 2024-02-12 19:16:32 +0100 |
---|---|---|
committer | daviddavid <geiger.david68210@gmail.com> | 2024-02-12 19:16:32 +0100 |
commit | 7ac3b0ede501838d0bba3ee80fa005312addb53e (patch) | |
tree | 21a8141438a4be5dc592c38aeb2a47d23984f94f /BuildManager/fileutil.py | |
parent | 23ce51cf774a24cafd46a9a5896e54f45c42de35 (diff) | |
download | bm-5ef11fbe3612651a19f99cfbbe20ddde60e64d8e.tar bm-5ef11fbe3612651a19f99cfbbe20ddde60e64d8e.tar.gz bm-5ef11fbe3612651a19f99cfbbe20ddde60e64d8e.tar.bz2 bm-5ef11fbe3612651a19f99cfbbe20ddde60e64d8e.tar.xz bm-5ef11fbe3612651a19f99cfbbe20ddde60e64d8e.zip |
Release 3.53.5
- remove trailing spaces
- fix bash-completion location
Diffstat (limited to 'BuildManager/fileutil.py')
-rw-r--r-- | BuildManager/fileutil.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/BuildManager/fileutil.py b/BuildManager/fileutil.py index 05126da..d045321 100644 --- a/BuildManager/fileutil.py +++ b/BuildManager/fileutil.py @@ -28,20 +28,20 @@ def _copy_file_contents (src, dst, buffer_size=16*1024): except os.error as e: (errno, errstr) = e.args raise Error("could not open %s: %s" % (src, errstr)) - + try: fdst = open(dst, 'wb') except os.error as e: (errno, errstr) = e.args raise Error("could not create %s: %s" % (dst, errstr)) - + while 1: try: buf = fsrc.read(buffer_size) except os.error as e: (errno, errstr) = e.args raise Error("could not read from %s: %s" % (src, errstr)) - + if not buf: break @@ -50,7 +50,7 @@ def _copy_file_contents (src, dst, buffer_size=16*1024): except os.error as e: (errno, errstr) = e.args raise Error("could not write to %s: %s" % (dst, errstr)) - + finally: if fdst: fdst.close() @@ -101,7 +101,7 @@ def copy_file (src, dst, preserve_mode=1, preserve_times=1, link=None, logger.info("%s %s to %s" % (action, src, dir)) else: logger.info("%s %s to %s" % (action, src, dst)) - + if dryrun: return (dst, 1) @@ -138,7 +138,7 @@ def move_file (src, dst, dryrun=False): """ from os.path import exists, isfile, isdir, basename, dirname import errno - + logger.info("moving %s to %s" % (src, dst)) if dryrun: |