diff --git a/roles/git/hooks/files/git.py b/roles/git/hooks/files/git.py index 72adff1f7c..586fbffd2b 100644 --- a/roles/git/hooks/files/git.py +++ b/roles/git/hooks/files/git.py @@ -202,7 +202,8 @@ def get_project_description(): description = os.path.join(git_dir, 'description') if os.path.exists(description): try: - projectdesc = open(description).read().strip() + with open(description, 'r') as f: + projectdesc = f.readline().strip() except: pass if projectdesc.startswith('Unnamed repository;'):