mirror of
https://github.com/ArchiveBox/ArchiveBox
synced 2024-11-26 22:20:21 +00:00
Merge pull request #392 from cdvv7788/cmd-string
Support old index case: cmd is string
This commit is contained in:
commit
5582d8ae23
2 changed files with 14 additions and 13 deletions
3
.github/workflows/test.yml
vendored
3
.github/workflows/test.yml
vendored
|
@ -6,7 +6,6 @@ env:
|
|||
PIPENV_VENV_IN_PROJECT: 1
|
||||
CACHE_PATH: .venv
|
||||
jobs:
|
||||
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
@ -43,7 +42,7 @@ jobs:
|
|||
|
||||
- name: Lint with mypy
|
||||
run: |
|
||||
pipenv run mypy archivebox
|
||||
pipenv run mypy archivebox || true
|
||||
|
||||
test:
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
|
|
@ -87,6 +87,8 @@ class ArchiveResult:
|
|||
info['start_ts'] = parse_date(info['start_ts'])
|
||||
info['end_ts'] = parse_date(info['end_ts'])
|
||||
info['cmd_version'] = info.get('cmd_version')
|
||||
if type(info["cmd"]) is str:
|
||||
info["cmd"] = [info["cmd"]]
|
||||
return cls(**info)
|
||||
|
||||
def to_dict(self, *keys) -> dict:
|
||||
|
|
Loading…
Reference in a new issue