commands: adapt feed repositories for python 3

This commit is contained in:
Frédéric Péters 2020-08-05 08:06:33 +02:00
parent af04cf99d9
commit 655aba6702
1 changed files with 4 additions and 4 deletions

View File

@ -41,11 +41,11 @@ class Command(BaseCommand):
except OSError:
continue
module = os.path.basename(repository).replace('.git', '')
print module
print(module)
try:
for line in subprocess.check_output(['git', 'log', '--format=format:%H👾%an👾%ae👾%aI👾%cI👾%s']).splitlines():
try:
sha, author_name, author_email, author_date, commit_date, subject = line.strip().split('👾')
sha, author_name, author_email, author_date, commit_date, subject = line.decode('utf-8').strip().split('👾')
except ValueError:
continue
if not author_email:
@ -60,6 +60,6 @@ class Command(BaseCommand):
commit.author_email = author_email
commit.save()
except subprocess.CalledProcessError as e:
print ' ', e
print(' ', e)
print time.time() - t0
print(time.time() - t0)