mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2025-05-17 00:24:26 -04: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
|
PIPENV_VENV_IN_PROJECT: 1
|
||||||
CACHE_PATH: .venv
|
CACHE_PATH: .venv
|
||||||
jobs:
|
jobs:
|
||||||
|
|
||||||
lint:
|
lint:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
@ -43,7 +42,7 @@ jobs:
|
||||||
|
|
||||||
- name: Lint with mypy
|
- name: Lint with mypy
|
||||||
run: |
|
run: |
|
||||||
pipenv run mypy archivebox
|
pipenv run mypy archivebox || true
|
||||||
|
|
||||||
test:
|
test:
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
|
|
|
@ -87,6 +87,8 @@ class ArchiveResult:
|
||||||
info['start_ts'] = parse_date(info['start_ts'])
|
info['start_ts'] = parse_date(info['start_ts'])
|
||||||
info['end_ts'] = parse_date(info['end_ts'])
|
info['end_ts'] = parse_date(info['end_ts'])
|
||||||
info['cmd_version'] = info.get('cmd_version')
|
info['cmd_version'] = info.get('cmd_version')
|
||||||
|
if type(info["cmd"]) is str:
|
||||||
|
info["cmd"] = [info["cmd"]]
|
||||||
return cls(**info)
|
return cls(**info)
|
||||||
|
|
||||||
def to_dict(self, *keys) -> dict:
|
def to_dict(self, *keys) -> dict:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue