remove Path.str() calls
This commit is contained in:
parent
b728df4bc0
commit
95cc5c7103
|
@ -36,7 +36,7 @@ class Path(str):
|
|||
|
||||
|
||||
def append(self, text):
|
||||
return Path(str(self.__path) + text)
|
||||
return Path(self + text)
|
||||
|
||||
|
||||
def backup(self, ext='backup', overwrite=False):
|
||||
|
|
|
@ -46,10 +46,12 @@ class SqlDatabase:
|
|||
engine_string = dbtype + '://'
|
||||
|
||||
if dbtype == 'sqlite':
|
||||
if nfs_check(kwargs.get('database')):
|
||||
database = kwargs.get('database')
|
||||
|
||||
if nfs_check(database):
|
||||
izzylog.error('Database file is on an NFS share which does not support locking. Any writes to the database will fail')
|
||||
|
||||
engine_string += '/' + str(kwargs.get('database'))
|
||||
engine_string += f'/{database}'
|
||||
engine_kwargs['connect_args'] = {'check_same_thread': False}
|
||||
|
||||
else:
|
||||
|
|
|
@ -176,7 +176,7 @@ class SqliteServer(misc.DotDict):
|
|||
self.setup_metadata()
|
||||
|
||||
for path in self.path.listdir(False):
|
||||
if path.str().endswith('.sqlite3') and path.stem != 'metadata':
|
||||
if path.endswith('.sqlite3') and path.stem != 'metadata':
|
||||
self.open(path.stem)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue