diff options
author | Jonathan Maw <jonathan.maw@codethink.co.uk> | 2017-11-10 16:05:16 +0000 |
---|---|---|
committer | Jonathan Maw <jonathan.maw@codethink.co.uk> | 2017-11-14 13:03:52 +0000 |
commit | f4afbf5941ca1cd7c74cbc1d837e57e196f2f85e (patch) | |
tree | e4394a883dec3966cd7d06ae378050ac7c6b7842 | |
parent | c903ecad41c3b58cb0333391495a504c91cb6b9a (diff) | |
download | buildstream-f4afbf5941ca1cd7c74cbc1d837e57e196f2f85e.tar.gz |
utils.py: Make safe copy/link/move use keyword args
The 'result' field is optional, and currently used only by the internals
of {copy,move,link}_files. I think it makes sense to mandate that it's
called as a keyword arg in future.
-rw-r--r-- | buildstream/utils.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/buildstream/utils.py b/buildstream/utils.py index 637d583b0..991f124dd 100644 --- a/buildstream/utils.py +++ b/buildstream/utils.py @@ -184,7 +184,7 @@ def sha256sum(filename): return h.hexdigest() -def safe_copy(src, dest, result=None): +def safe_copy(src, dest, *, result=None): """Copy a file while preserving attributes Args: @@ -222,7 +222,7 @@ def safe_copy(src, dest, result=None): pass -def safe_move(src, dest, result=None): +def safe_move(src, dest, *, result=None): """Move a file while preserving attributes Args: @@ -255,7 +255,7 @@ def safe_move(src, dest, result=None): raise -def safe_link(src, dest, result=None): +def safe_link(src, dest, *, result=None): """Try to create a hardlink, but resort to copying in the case of cross device links. Args: |