diff options
-rwxr-xr-x | lorry.raw-file-importer | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/lorry.raw-file-importer b/lorry.raw-file-importer index bca46b5..caaa8c9 100755 --- a/lorry.raw-file-importer +++ b/lorry.raw-file-importer @@ -39,7 +39,11 @@ def commit_lfs_gitattributes(fast_import): def commit_lfs_file(raw_file, relative_path, last_commit, fast_import): # git-lfs-pointer of the file - ret = subprocess.run(['git', 'lfs', 'pointer', '--file', raw_file], capture_output=True, check=True) + ret = subprocess.run( + ['git', 'lfs', 'pointer', '--file', raw_file], + stdout=subprocess.PIPE, + check=True, + ) pointer_digest = ret.stdout datasize = len(pointer_digest) @@ -86,7 +90,11 @@ def commit_lfs_file(raw_file, relative_path, last_commit, fast_import): def get_last_commit(): # show the full hash of the latest commit - out = subprocess.run(['git', 'rev-parse', branch_ref], capture_output=True, text=True) + out = subprocess.run( + ['git', 'rev-parse', branch_ref], + stdout=subprocess.PIPE, + universal_newlines=True, + ) if out.returncode != 0: return None |