Rev1427, Skip invalid files on dbRebuild
This commit is contained in:
parent
3ce11a0dab
commit
887a07c3fb
2 changed files with 7 additions and 3 deletions
|
@ -8,7 +8,7 @@ class Config(object):
|
|||
|
||||
def __init__(self, argv):
|
||||
self.version = "0.4.0"
|
||||
self.rev = 1426
|
||||
self.rev = 1427
|
||||
self.argv = argv
|
||||
self.action = None
|
||||
self.config_file = "zeronet.conf"
|
||||
|
|
|
@ -118,8 +118,12 @@ class SiteStorage(object):
|
|||
s = time.time()
|
||||
try:
|
||||
for file_inner_path, file in self.getDbFiles():
|
||||
if self.db.loadJson(file_inner_path, file=file, cur=cur):
|
||||
found += 1
|
||||
try:
|
||||
if self.db.loadJson(file_inner_path, file=file, cur=cur):
|
||||
found += 1
|
||||
except Exception, err:
|
||||
self.log.error("Error importing %s: %s" % (file_inner_path, Debug.formatException(err)))
|
||||
|
||||
finally:
|
||||
cur.execute("END")
|
||||
self.log.info("Imported %s data file in %ss" % (found, time.time() - s))
|
||||
|
|
Loading…
Reference in a new issue