From a5c8c2022b79f406fc4ce30d78c0ad16d2619f97 Mon Sep 17 00:00:00 2001 From: Michael Gukov Date: Mon, 17 Dec 2018 01:47:01 +0500 Subject: [PATCH] Python3 --- gitosis/init.py | 7 +++++-- gitosis/repository.py | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/gitosis/init.py b/gitosis/init.py index 214b35c..d81ceed 100644 --- a/gitosis/init.py +++ b/gitosis/init.py @@ -87,8 +87,11 @@ def init_admin_repository( # ConfigParser does not guarantee order, so jump through hoops # to make sure [gitosis] is first cfg_file = StringIO() - print >>cfg_file, '[gitosis]' - print >>cfg_file + print('[gitosis]', file=cfg_file) + #print('', end="", file=cfg_file) + + #print >>cfg_file, '[gitosis]' + #print >>cfg_file cfg = RawConfigParser() cfg.add_section('group gitosis-admin') cfg.set('group gitosis-admin', 'members', user) diff --git a/gitosis/repository.py b/gitosis/repository.py index 8617afe..884549b 100644 --- a/gitosis/repository.py +++ b/gitosis/repository.py @@ -185,7 +185,7 @@ def has_initial_commit(git_dir): stdout=subprocess.PIPE, close_fds=True, ) - got = child.stdout.read() + got = child.stdout.read().decode('utf-8') returncode = child.wait() if returncode != 0: raise GitRevParseError('exit status %d' % returncode)