Files
python_skripte/test_skripte/check_git.py
2024-10-09 18:01:24 +02:00

17 lines
427 B
Python

import subprocess, os
def git_test(git_file=str)
return subprocess.Popen(
'git log -1 --pretty=format:"%h:%c" {git_file}'.format(
git_file=git_file ),
shell=True,
universal_newlines=True,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
).communicate()
if __name__ == "__main__":
print(git_test=(git_file="/home/jonnybravo/Python_Skripte/jenkins-module.txt"))