1
0
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:
Nick Sweeting
2020-07-24 15:49:23 -04:00
committed by GitHub
2 changed files with 14 additions and 13 deletions

View File

@@ -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 }}

View File

@@ -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: