diff --git a/buildtrigger/gitlabhandler.py b/buildtrigger/gitlabhandler.py index 66a3192fa..777555b35 100644 --- a/buildtrigger/gitlabhandler.py +++ b/buildtrigger/gitlabhandler.py @@ -337,8 +337,11 @@ class GitLabBuildTrigger(BuildTriggerHandler): def lookup_user(self, email): gl_client = self._get_authorized_client() try: - [user] = gl_client.getusers(search=email) + result = gl_client.getusers(search=email) + if result is False: + return None + [user] = result return { 'username': user['username'], 'html_url': gl_client.host + '/' + user['username'],