diff --git a/pagure/exceptions.py b/pagure/exceptions.py index 611f25e..8927952 100644 --- a/pagure/exceptions.py +++ b/pagure/exceptions.py @@ -50,3 +50,10 @@ class PagureEvException(PagureException): ''' Exceptions used in the pagure-stream-server. ''' pass + + +class GitConflictsException(PagureException): + ''' Exception used when trying to pull on a repo and that leads to + conflicts. + ''' + pass diff --git a/pagure/lib/repo.py b/pagure/lib/repo.py index f887e97..5f83871 100644 --- a/pagure/lib/repo.py +++ b/pagure/lib/repo.py @@ -55,7 +55,7 @@ class PagureRepo(pygit2.Repository): master_ref.set_target(remote_master_id) self.head.set_target(remote_master_id) elif merge_result & pygit2.GIT_MERGE_ANALYSIS_NORMAL: - raise pagure.exceptions.PagureException( + raise pagure.exceptions.GitConflictsException( 'Pulling remote changes leads to a conflict') else: pagure.LOG.debug(