Skip to content

Commit

Permalink
Merge pull request #2 from maweki/patch-1
Browse files Browse the repository at this point in the history
Added python3 compatibility
  • Loading branch information
jhshi committed Feb 13, 2016
2 parents a511ab0 + b37c79b commit 1e42ac2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions post_revision.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
meta data named ``history``, which is a list of ``<date, msg>`` tuples in
reverse order by date.
"""
import sys
import subprocess
import dateutil

Expand All @@ -30,6 +31,7 @@ def generate_post_revision(generator):
try:
output = subprocess.check_output('git log --format="%%ai|%%s" %s'\
% (path), shell=True)
output = output.decode() if sys.version_info[0] == 3 else output
commits = []
for line in output.split('\n'):
line = line.strip()
Expand Down

0 comments on commit 1e42ac2

Please sign in to comment.