remove timeout Library field

This commit is contained in:
Adrian Sampson 2013-05-19 10:19:52 -07:00
parent c56ef31da0
commit 3e740b7d24
2 changed files with 4 additions and 4 deletions

View file

@ -1113,7 +1113,6 @@ class Library(BaseLibrary):
directory='~/Music',
path_formats=((PF_KEY_DEFAULT,
'$artist/$album/$track $title'),),
timeout=5.0,
replacements=None,
item_fields=ITEM_FIELDS,
album_fields=ALBUM_FIELDS):
@ -1127,7 +1126,6 @@ class Library(BaseLibrary):
self._memotable = {} # Used for template substitution performance.
self.timeout = timeout
self._connections = {}
self._tx_stacks = defaultdict(list)
# A lock to protect the _connections and _tx_stacks maps, which
@ -1208,7 +1206,10 @@ class Library(BaseLibrary):
return self._connections[thread_id]
else:
# Make a new connection.
conn = sqlite3.connect(self.path, timeout=self.timeout)
conn = sqlite3.connect(
self.path,
timeout=beets.config['timeout'].as_number(),
)
# Access SELECT results like dictionaries.
conn.row_factory = sqlite3.Row

View file

@ -729,7 +729,6 @@ def _raw_main(args):
dbpath,
config['directory'].as_filename(),
get_path_formats(),
config['timeout'].as_number(),
get_replacements(),
)
except sqlite3.OperationalError: