summaryrefslogtreecommitdiffstats
path: root/combox/file.py
diff options
context:
space:
mode:
authorSiddharth Ravikumar <sravik@bgsu.edu>2015-03-06 08:32:20 -0500
committerSiddharth Ravikumar <sravik@bgsu.edu>2015-03-06 08:32:20 -0500
commit2c7c011d68691ffe3aa7d308479e7204c2727617 (patch)
treedb2bb684809bf27fcb9959caefc4a6b13ac4281b /combox/file.py
parent1c494ddad4fbb99ddb94ba54e2e77ae01aceec06 (diff)
modded combox.file.node_path function.
It has a third argument (boolean) which tells whether `cb_path' (the first argument) is a file or not. Updated the test for node_path function + code wherever node_path was used. modified: combox/events.py modified: combox/file.py modified: tests/file_test.py
Diffstat (limited to 'combox/file.py')
-rw-r--r--combox/file.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/combox/file.py b/combox/file.py
index fe5c58e..1606da5 100644
--- a/combox/file.py
+++ b/combox/file.py
@@ -69,15 +69,16 @@ def cb_path(node_path, config):
return file_cb_path
-def node_path(cb_path, config):
+def node_path(cb_path, config, isfile):
"""Returns abs. path of file (in node dir.) given the cb_path (combox dir. path).
If cb_path is a file, it returns the path to its first shard in
the first node directory.
+ isfile: True if cb_path is a file.
"""
- if path.isfile(cb_path):
+ if isfile:
# partition function is used to remove the `.shard.N' from the
# file name.
rel_file_path = relative_path(cb_path, config)