mirror of
https://github.com/pirate/ArchiveBox.git
synced 2025-08-29 01:00:11 +02:00
Merge pull request #392 from cdvv7788/cmd-string
Support old index case: cmd is string
This commit is contained in:
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:
|
||||||
|
Reference in New Issue
Block a user