Skip to content
This repository was archived by the owner on Mar 18, 2019. It is now read-only.

Commit 8fd46cb

Browse files
committed
Allow dotted paths in console 'action' command
1 parent 701f44e commit 8fd46cb

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

coreapi/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from coreapi.transport import BaseTransport, HTTPTransport
77

88

9-
__version__ = '1.2.2'
9+
__version__ = '1.2.3'
1010
__all__ = [
1111
'BaseCodec', 'CoreJSONCodec', 'HTMLCodec', 'PlainTextCodec', 'PythonCodec',
1212
'negotiate_encoder', 'negotiate_decoder',

coreapi/commandline.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,14 +153,16 @@ def action(path, fields):
153153
key, value = field.split('=', 1)
154154
kwargs[key] = value
155155

156+
keys = dotted_path_to_list(doc, path[0])
157+
156158
try:
157159
doc = read_from_store()
158160
except NoDocument:
159161
click.echo('No current document. Use `coreapi get` to fetch a document first.')
160162
return
161163

162164
session = get_session()
163-
doc = session.action(doc, path, **kwargs)
165+
doc = session.action(doc, keys, **kwargs)
164166
click.echo(dump_to_console(doc))
165167
write_to_store(doc)
166168

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy