diff options
author | Joshua Harlow <harlowja@yahoo-inc.com> | 2015-05-14 13:04:24 -0700 |
---|---|---|
committer | Joshua Harlow <harlowja@yahoo-inc.com> | 2015-06-04 10:39:20 -0700 |
commit | 4ee5ffd0871fcab8e814c0eaade0f184570269b1 (patch) | |
tree | b089a751b7985996b19e52c8320a54b1c1db91f8 /taskflow/examples | |
parent | 9091a9ce96ab29182e97f975dcbf73978b5a5682 (diff) | |
download | taskflow-4ee5ffd0871fcab8e814c0eaade0f184570269b1.tar.gz |
Add a new `ls_r` method
Instead of having a `ls` method that when used recursively
*always* returns the absolute path of items in the fake in
memory storage tree and *relative* paths (when used in
non-recursive mode) add a new `ls_r` method that can return
absolute *or* relative paths.
In the future it is highly likely that the the `ls` recursive
keyword argument will be removed (so preferring and
moving to the `ls_r` should occur earlier rather than
later), so this also adds a debtcollector removed keyword
argument decorator over the existing `ls` to ensure that users
are aware of this change (as well as a adjusted docstring).
Fixes bug 1458114
Change-Id: Id2a5869e94ac44679020a14297d1073d1dc2718f
Diffstat (limited to 'taskflow/examples')
-rw-r--r-- | taskflow/examples/dump_memory_backend.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/taskflow/examples/dump_memory_backend.py b/taskflow/examples/dump_memory_backend.py index 2e3aee7..6c6d548 100644 --- a/taskflow/examples/dump_memory_backend.py +++ b/taskflow/examples/dump_memory_backend.py @@ -70,7 +70,7 @@ e.run() print("---------") print("After run") print("---------") -for path in backend.memory.ls(backend.memory.root_path, recursive=True): +for path in backend.memory.ls_r(backend.memory.root_path, absolute=True): value = backend.memory[path] if value: print("%s -> %s" % (path, value)) |