Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

List indices do not work #15

Open
iliapolo opened this issue Apr 20, 2019 · 0 comments
Open

List indices do not work #15

iliapolo opened this issue Apr 20, 2019 · 0 comments
Assignees
Labels
bug This issue reports a bug minor Implies this code change should bump the minor version of the project

Comments

@iliapolo
Copy link
Owner

iliapolo commented Apr 20, 2019

Accessing specific elements in an array/list does not work.

For example, given the following configuration file:

{
  "services": [
          {"a": "b"}, 
          {"a": "c"}
  ]
}

Running this command: dictfile configure config get --key services:1 results in an error:

Error: list indices must be integers, not unicode

While the expected output is {"a": "c"}

Note that we also need positional offset accessors. That is, the following command should also work:

dictfile configure config put --key services:0:a --value d

@iliapolo iliapolo added bug This issue reports a bug minor Implies this code change should bump the minor version of the project labels Apr 20, 2019
@iliapolo iliapolo self-assigned this Apr 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue reports a bug minor Implies this code change should bump the minor version of the project
Projects
None yet
Development

No branches or pull requests

1 participant