From 8312e7ee3c80f39b0710e9cc552a4da20797ab11 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Nov 24 2017 08:35:42 +0000 Subject: Do not update git is no folder is provided and small style fix Checking if a git folder is provided before creating the task, this allows speeding up the tests. Signed-off-by: Pierre-Yves Chibon --- diff --git a/pagure/lib/git.py b/pagure/lib/git.py index 1fdcb21..4751b60 100644 --- a/pagure/lib/git.py +++ b/pagure/lib/git.py @@ -132,6 +132,9 @@ def generate_gitolite_acls(project=None, group=None): def update_git(obj, repo, repofolder): """ Schedules an update_repo task after determining arguments. """ + if not repofolder: + return None + ticketuid = None requestuid = None if obj.isa == 'issue': @@ -152,8 +155,8 @@ def update_git(obj, repo, repofolder): def _maybe_wait(result): """ Function to patch if one wants to wait for finish. - This function should only ever be overridden by a few tests that depend on - counting and very precise timing. """ + This function should only ever be overridden by a few tests that depend + on counting and very precise timing. """ pass