Skip to content
Snippets Groups Projects
Commit 3c4042a4 authored by I. Nüske's avatar I. Nüske
Browse files

MNT: Fix assorted simple pylint errors

parent b236f79a
No related branches found
No related tags found
2 merge requests!128MNT: Added a warning when column metadata is not configured, and a better...,!126Fix pylint errors
......@@ -375,9 +375,7 @@ exclude is given preference over include.
logger.addHandler(logging.StreamHandler(stream=sys.stdout))
logger.setLevel(logging.INFO)
con = db.get_connection()
con.timeout = float(args.timeout)
con._login()
db.configure_connection(timeout=float(args.timeout))
loadpath(
path=args.path,
......
......@@ -107,12 +107,10 @@ it is not at the beginning, it must be preceded by a blank line.
textlines = f.readlines()
state = 0
found_0 = -1
found_1 = -1
found_2 = -1
for i, line in enumerate(textlines):
if len(line) == 1 and state in {-1, 0}:
found_0 = i
state = 0
continue
if line.rstrip() == "---" and state == 0:
......
......@@ -28,6 +28,7 @@ class SuppressKnown(logging.Filter):
"""
def __init__(self, db_file=None):
super().__init__()
if db_file:
self.db_file = db_file
else:
......
......@@ -27,7 +27,7 @@ import logging
import os
import linkahead as db
from linkahead.exceptions import TransactionError
from linkahead.exceptions import TransactionError, BadQueryError
logger = logging.getLogger(__name__)
......@@ -232,7 +232,7 @@ def find_records_that_reference_ids(referenced_ids, rt="", step_size=50):
[str(el) for el in subset]))
exps = db.execute_query(q_string)
record_ids.update([exp.id for exp in exps])
except Exception as e:
except (TransactionError, BadQueryError) as e:
print(e)
index += step_size
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment