From 655aba67029f711182a9ba47f0e36bcc7667131d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Wed, 5 Aug 2020 08:06:33 +0200 Subject: [PATCH] commands: adapt feed repositories for python 3 --- eodb/events/management/commands/feed_repositories.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/eodb/events/management/commands/feed_repositories.py b/eodb/events/management/commands/feed_repositories.py index db8f12e..ca9e246 100644 --- a/eodb/events/management/commands/feed_repositories.py +++ b/eodb/events/management/commands/feed_repositories.py @@ -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)