From f7666ddf5a85b79f163867c4c41e142b1d265dd8 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Jul 25 2017 16:47:32 +0000 Subject: [PATCH 1/2] Stop using readlines() to drop the trailing new line character Signed-off-by: Pierre-Yves Chibon --- diff --git a/pagure/lib/git_auth.py b/pagure/lib/git_auth.py index 577b668..b98d4ac 100644 --- a/pagure/lib/git_auth.py +++ b/pagure/lib/git_auth.py @@ -283,7 +283,7 @@ class Gitolite2Auth(GitAuthHelper): """ _log.info('Reading in the current configuration: %s', configfile) with open(configfile) as stream: - current_config = stream.readlines() + current_config = [line for line in stream] if preconfig: idx = None From de7a1a451a39b130da4540962d08541c27dea201 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Jul 25 2017 16:47:32 +0000 Subject: [PATCH 2/2] Fix logging by properly formatting the message Signed-off-by: Pierre-Yves Chibon --- diff --git a/pagure/lib/tasks.py b/pagure/lib/tasks.py index 41a84f5..22a376e 100644 --- a/pagure/lib/tasks.py +++ b/pagure/lib/tasks.py @@ -455,7 +455,7 @@ def merge_pull_request(name, namespace, user, requestid, user_merger): request = pagure.lib.search_pull_requests( session, project_id=project.id, requestid=requestid) _log.debug( - 'Merging pull-request: %/#%s', request.project.fullname, + 'Merging pull-request: %s/#%s', request.project.fullname, request.id) pagure.lib.git.merge_pull_request( session, request, user_merger, APP.config['REQUESTS_FOLDER'])