-
-
Notifications
You must be signed in to change notification settings - Fork 52
Open
Description
Type aw-client query my-query.txt and get an error as in the title.
The problem is that at line 101 --json is converted to json but used as _json on line 117.
Lines 101 to 118 in 8f9483d
| @click.option("--json", is_flag=True) | |
| @click.option("--start", default=now - td1day, type=click.DateTime()) | |
| @click.option("--stop", default=now + td1yr, type=click.DateTime()) | |
| @click.pass_obj | |
| def query( | |
| obj: _Context, | |
| path: str, | |
| cache: bool, | |
| _json: bool, | |
| start: datetime, | |
| stop: datetime, | |
| name: Optional[str] = None, | |
| ): | |
| with open(path) as f: | |
| query = f.read() | |
| result = obj.client.query(query, [(start, stop)], cache=cache, name=name) | |
| if _json: | |
| print(json.dumps(result)) |
The query switch is unusable because of that.
Metadata
Metadata
Assignees
Labels
No labels