aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xcontrib/gcc-changelog/git_email.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/contrib/gcc-changelog/git_email.py b/contrib/gcc-changelog/git_email.py
index ef50ebf..093c887 100755
--- a/contrib/gcc-changelog/git_email.py
+++ b/contrib/gcc-changelog/git_email.py
@@ -39,7 +39,11 @@ unidiff_supports_renaming = hasattr(PatchedFile(), 'is_rename')
class GitEmail(GitCommit):
def __init__(self, filename):
self.filename = filename
- diff = PatchSet.from_filename(filename, newline='\n')
+ try:
+ diff = PatchSet.from_filename(filename, newline='\n')
+ except TypeError:
+ # Older versions don't have the newline argument
+ diff = PatchSet.from_filename(filename)
date = None
author = None
subject = ''