From a49884ade81871756de4ea599b7001a2ca0c74a6 Mon Sep 17 00:00:00 2001 From: Nick Sweeting Date: Mon, 8 Feb 2021 23:22:02 -0500 Subject: [PATCH] fix emptystrings in cmd_version causing exception --- archivebox/index/schema.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/archivebox/index/schema.py b/archivebox/index/schema.py index 7501da3a..fa5895ae 100644 --- a/archivebox/index/schema.py +++ b/archivebox/index/schema.py @@ -55,11 +55,11 @@ class ArchiveResult: assert isinstance(self.end_ts, datetime) assert isinstance(self.cmd, list) assert all(isinstance(arg, str) and arg for arg in self.cmd) - assert self.pwd is None or isinstance(self.pwd, str) and self.pwd - assert self.cmd_version is None or isinstance(self.cmd_version, str) and self.cmd_version - assert self.output is None or isinstance(self.output, (str, Exception)) - if isinstance(self.output, str): - assert self.output + + # TODO: replace emptystrings in these three with None / remove them from the DB + assert self.pwd is None or isinstance(self.pwd, str) + assert self.cmd_version is None or isinstance(self.cmd_version, str) + assert self.output is None or (isinstance(self.output, (str, Exception)) @classmethod def guess_ts(_cls, dict_info):