mirror of
https://github.com/internetarchive/warcprox.git
synced 2025-01-18 13:22:09 +01:00
Merge pull request #10 from ikreymer/dev.fix-sync
check if 'sync' method exists before calling it
This commit is contained in:
commit
e8438dc8ad
@ -689,7 +689,8 @@ class DedupDb(object):
|
||||
self.db.close()
|
||||
|
||||
def sync(self):
|
||||
self.db.sync()
|
||||
if hasattr(self.db, 'sync'):
|
||||
self.db.sync()
|
||||
|
||||
def save(self, key, response_record, offset):
|
||||
record_id = response_record.get_header(warctools.WarcRecord.ID).decode('latin1')
|
||||
@ -999,7 +1000,8 @@ class PlaybackIndexDb(object):
|
||||
|
||||
|
||||
def sync(self):
|
||||
self.db.sync()
|
||||
if hasattr(self.db, 'sync'):
|
||||
self.db.sync()
|
||||
|
||||
|
||||
def save(self, warcfile, recordset, offset):
|
||||
|
Loading…
x
Reference in New Issue
Block a user