Skip to content
This repository has been archived by the owner on Feb 3, 2020. It is now read-only.

IndexError: list index out of range #24

Open
arthurzenika opened this issue Jun 13, 2019 · 3 comments
Open

IndexError: list index out of range #24

arthurzenika opened this issue Jun 13, 2019 · 3 comments
Assignees
Labels

Comments

@arthurzenika
Copy link

Traceback (most recent call last):
  File "/tmp/example/.tox/dockerlint/bin/whale-linter", line 5, in <module>
    whalelinter.run()
  File "/tmp/example/.tox/dockerlint/lib/python3.6/site-packages/whalelinter/__init__.py", line 49, in run
    checker.check()
  File "/tmp/example/.tox/dockerlint/lib/python3.6/site-packages/whalelinter/checker.py", line 20, in check
    dispatcher.react(line)
  File "/tmp/example/.tox/dockerlint/lib/python3.6/site-packages/whalelinter/dispatcher.py", line 35, in react
    docker_command.arguments, docker_command.line)
  File "/tmp/example/.tox/dockerlint/lib/python3.6/site-packages/whalelinter/token.py", line 108, in __init__
    self.labels = {l.split('=')[0]: l.split('=')[1] for l in self.payload}
  File "/tmp/example/.tox/dockerlint/lib/python3.6/site-packages/whalelinter/token.py", line 108, in <dictcomp>
    self.labels = {l.split('=')[0]: l.split('=')[1] for l in self.payload}
IndexError: list index out of range
@jeromepin
Copy link
Owner

Hi @arthurlogilab

Can you provide the associated Dockerfile ?

@jeromepin jeromepin added the bug label Jun 14, 2019
@jeromepin jeromepin self-assigned this Jun 14, 2019
@arthurzenika
Copy link
Author

Hi, I think the following is enough to get reproduce the bug :

FROM debian:buster-slim
LABEL maintainer "Logilab <[email protected]>" \
    org.label-schema.vendor = "Logilab"

@arthurzenika
Copy link
Author

Replacing it by

LABEL maintainer="Logilab <[email protected]>"
LABEL org.label-schema.vendor="Logilab"

Seems to fix it, but it would be nice for whale-linter to find this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants