From 78f60b59f6ad0adbdc2512fd2ea82d4d789efc6c Mon Sep 17 00:00:00 2001 From: Malte Tashiro Date: Fri, 6 Dec 2024 07:45:53 +0000 Subject: [PATCH] Do not print INFO messages from Neo4j --- iyp/__init__.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/iyp/__init__.py b/iyp/__init__.py index 9514085..c416da4 100644 --- a/iyp/__init__.py +++ b/iyp/__init__.py @@ -10,7 +10,7 @@ import requests from github import Github -from neo4j import GraphDatabase +from neo4j import GraphDatabase, NotificationMinimumSeverity BATCH_SIZE = 50000 @@ -159,7 +159,9 @@ def __init__(self): # Connect to the database uri = f'neo4j://{self.server}:{self.port}' - self.db = GraphDatabase.driver(uri, auth=(self.login, self.password)) + self.db = GraphDatabase.driver(uri, + auth=(self.login, self.password), + notifications_min_severity=NotificationMinimumSeverity.WARNING) if self.db is None: raise ConnectionError('Could not connect to the Neo4j database!')