Set default error text
This commit is contained in:
parent
2ee39ea278
commit
90310b553e
|
@ -6,6 +6,8 @@ class Error(DBObject):
|
|||
def __init__(self, error: str, time: datetime, primary_key=None):
|
||||
super(Error, self).__init__(primary_key)
|
||||
self.error = error.strip()
|
||||
if not self.error:
|
||||
self.error = "No error information supplied"
|
||||
self.time = time
|
||||
|
||||
@classmethod
|
||||
|
|
|
@ -6,7 +6,6 @@ import argparse
|
|||
from borgmanager.borg import OutputHandler
|
||||
from borgmanager.summary import Summary
|
||||
from borgmanager.logging import Log, LEVEL_DEBUG, LEVEL_WARNING
|
||||
from time import sleep
|
||||
|
||||
|
||||
def main(args, path: Path, log: Log):
|
||||
|
@ -19,7 +18,7 @@ def main(args, path: Path, log: Log):
|
|||
db = BorgDatabase(path / 'borg.sqlite', log)
|
||||
|
||||
if args.summary:
|
||||
log.debug("args.summary")
|
||||
log.debug("creating summary")
|
||||
summary = Summary(db)
|
||||
print(summary.repo_stats())
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue
Block a user